How to index match using a reference from one table to point to another?

Halabis

New Member
Joined
Jun 22, 2015
Messages
11
I'm working on a formula to pull values from various different tables based on the values in a drop down menu. I have been doing this with a series of nested if/then statements, but as I am adding more options to the dropdown it is getting increasingly unwieldy. My current formula that does everything i want (but is hard to expand upon) is:

=IF(IFERROR(IF(L$1=Q$2,INDEX(PNAll[Calls],MATCH(Table!D2,PNAll[Index],0)),IF(L$1=Q$3,INDEX(PNASL[Calls],MATCH(Table!D2,PNASL[Index],0)),IF(L$1=Q$4,INDEX(Orig_100[Calls],MATCH(Table!D2,Orig_100[Index],0)),IF(L$1=Q$5,INDEX(POAll[Calls],MATCH(Table!D2,POAll[Index],0)))))),0)>O$1,O$2,IFERROR(IF(L$1=Q$2,INDEX(PNAll[Calls],MATCH(Table!D2,PNAll[Index],0)),IF(L$1=Q$3,INDEX(PNASL[Calls],MATCH(Table!D2,PNASL[Index],0)),IF(L$1=Q$4,INDEX(Orig_100[Calls],MATCH(Table!D2,Orig_100[Index],0)),IF(L$1=Q$5,INDEX(POAll[Calls],MATCH(Table!D2,POAll[Index],0)))))),0))

For my new (easier to update) version I have created:

=INDEX(INDEX(Filter[TableRef],MATCH($L$1,Filter[Source Filter],0))&"[Calls]",MATCH([@Index],INDEX(Filter[TableRef],MATCH($L$1,Filter[Source Filter],0))&"[Index]",0))

The idea being instead of having to add each new table as a separate if/then I can just add it as a new line to the TableRef table and it will point there automatically. I am almost certain the issue is coming where I am trying to concatenate the table column reference into the table name, but I'm not sure how to work around the issue.

Thanks!
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,215,215
Messages
6,123,668
Members
449,114
Latest member
aides

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