# Thread: Refrencing a cell in a Index Formula Thanks: 0 Likes:  1 Post #5342152 (1)

1. ## Refrencing a cell in a Index Formula

What I do is pull data from multiple sources on the internet sometimes it can be 500 rows sometimes 10000. I then have a sheet that uses a formula like =INDEX(B1:B10000,MATCH(R2,A1:A10000,0). I can set a cell up in say S1 That tells me there is 600 rows of data. is there a way to reference the 600 in Cell S1 to place the 10000 in the formula.

Thanks

2. ## Re: Refrencing a cell in a Index Formula

=INDEX(INDIRECT("B1:B"&S1),MATCH(R2,INDIRECT("A1:A"&S1),0))

3. ## Re: Refrencing a cell in a Index Formula

Perhaps=INDEX(B1:INDEX(B1:B100000,S1),MATCH(R2,INDEX(A1:INDEX(A1:A100000,S1))),0)

4. ## Re: Refrencing a cell in a Index Formula

Originally Posted by Fluff
=INDEX(INDIRECT("B1:B"&S1),MATCH(R2,INDIRECT("A1:A"&S1),0))

Thank you much I tried this and it looks like it works now lets see if it speeds up my calculations.

Thanks again

5. ## Re: Refrencing a cell in a Index Formula

Try the formula posted by arthurbr as that is non-volatile & should be better.

6. ## Re: Refrencing a cell in a Index Formula

Originally Posted by Fluff
Try the formula posted by arthurbr as that is non-volatile & should be better.
I tried but get an error message that i entered too few arguments?

7. ## Re: Refrencing a cell in a Index Formula

Try
=INDEX(B1:INDEX(B1:B100000,S1),MATCH(R2,INDEX(A1:INDEX(A1:A100000,S1),0),0))

8. ## Re: Refrencing a cell in a Index Formula

Still get the same too few arguments?

9. ## Re: Refrencing a cell in a Index Formula

Originally Posted by Fluff
Try
=INDEX(B1:INDEX(B1:B100000,S1),MATCH(R2,INDEX(A1:INDEX(A1:A100000,S1),0),0))
Now it is working. Thanks for the help not sure why i was getting error before.

10. ## Re: Refrencing a cell in a Index Formula

You're welcome & thanks for the feedback

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•