Index/Match using a range from another sheet?

Nordicrx8

Board Regular
Joined
Dec 10, 2015
Messages
143
Office Version
  1. 365
Platform
  1. Windows
Hi All!

My google searches are coming up empty, so I'm not sure if this is even possible.

I'm trying to do a simple Index/match to grab data from another sheet, but with an added twist of instead of hard typing in the range it's pulling data from, it gets the range from another cell on a separate tab.

This is what the normal code looks like:

=INDEX('MTD Shrink'!J7:J29,MATCH(Main!AG7,'MTD Shrink'!A7:A29,0))

Here is what I want it to do:

=INDEX('MTD Shrink'!('Data Location'!O13),MATCH(Main!AG7,'MTD Shrink'!A7:A29,0))

So instead of typing in the range J7:29, it's looking in the data location tab, in Cell O13, which has J7:J29 in it.

Is this possible to do, either using index match or another formula?

Thanks so much all!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
You can do it using the INDIRECT function, it's slow, single threaded & volatile, so best avoided if possible.
 
Upvote 0
Yep, try not to use Indirect. Use a macro for searching through sheets
 
Upvote 0
Hmm - I have about 40 cells that I would need to do this for. do you think indirect would break on such a small number of cells?

regarding a macro, I'm not seeing how this would solve for the issue - could you provide an example?

thanks for the quick responses!
 
Upvote 0
I have about 40 cells that I would need to do this for. do you think indirect would break on such a small number of cells?
Best way to find out is to try it.
Excel Formula:
=INDEX(INDIRECT("'MTD Shrink'!"&'Data Location'!O13),MATCH(Main!AG7,'MTD Shrink'!A7:A29,0))
 
Upvote 0
Solution
Best way to find out is to try it.
Excel Formula:
=INDEX(INDIRECT("'MTD Shrink'!"&'Data Location'!O13),MATCH(Main!AG7,'MTD Shrink'!A7:A29,0))
That worked perfectly! I ended up having to use two indirects, so it'll be about 80 in total. I'll start working on getting them updated now, and pray to the excel gods that it doesn't break. LOL.

Thank you!! :)

=INDEX(INDIRECT("'MTD Shrink'!"&'Data Location'!N23),MATCH(Main!AG7,INDIRECT("'MTD Shrink'!"&'Data Location'!N18),0))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,859
Messages
6,121,963
Members
449,059
Latest member
oculus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top