Share via

Using Index function to define range

Anonymous
2015-08-08T00:20:04+00:00

Today I had to define a range using the Index function to be used in another formula.

A1:INDEX(B1:B4,2)

I haven't been able to find a way to use anything other than a plain cell reference (like A1) for the start of the range.

Is there a way to make that first reference dynamic? Like using two index functions separated by the semicolon?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Vijay A. Verma 104.9K Reputation points Volunteer Moderator
2015-08-08T10:20:36+00:00

Yes, you can use another INDEX for A1 as INDEX returns reference not value. Hence, you can write for example -

INDEX(A1:A10,5):INDEX(B1:B4,2)

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2015-08-08T04:42:14+00:00

"=VLOOKUP(9,A1:INDEX(C1:C6,6),3,FALSE)"

your formula is not dynamic.  If you want to make it dynamic, you need to see the second argument in index dynamic, for example INDEX(C1:C6,COUNTA(C:C))

If you also want A1 to be dynamic, you may actually use two INDEX to make your range, e.g.

=INDEX(A1:A6,2):INDEX(C1:C6,6)

where 2, and 6 are the dynamic parts you need to think about.

Was this answer helpful?

0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2015-08-08T04:27:48+00:00

    A  B  C

    1 8   a   x

    2 8   b   y

    3 9   c   z

    4 9   a   x

    510  b   y

    6 10  c   z

    =VLOOKUP(9,A1:INDEX(C1:C6,6),3,FALSE)

    I need to be able to move that A1 around dynamically as the cell reference returned by INDEX(C1:C6,6) does. (it returns cell C6).

    The second part of the range (index formula) can be dynamic.

    But I am still looking for an example of that A1being anything other than a regular cell reference.

    Thank you

    Was this answer helpful?

    0 comments No comments
  2. Ashish Mathur 101.9K Reputation points Volunteer Moderator
    2015-08-08T03:49:21+00:00

    Hi,

    That will not work.  You will have to write the INDEX formula as below and use it within another formula

    =INDEX(A1:B4,,)

    If you want more specific help, then please post your exact question.

    Was this answer helpful?

    0 comments No comments
  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more