Generating result from multiple tables using multiple variables

Friikijs

New Member
Joined
Apr 25, 2015
Messages
3
Hello excel gurus!
I will try to be be as comprehensible as possible.

I have a calculation of data where I have to fill 3 cells from drop down menus to get a result.
1st cell indicates the table I have to use for the other data (lets name them table1, table2, table3)
2nd cell indicates row headline parameters (lets name them a, b, c, d, e, f)
3rd cell indicates column headline parameters (lets name them 1, 2, 3, 4, 5, 6)

Lets say we put Table2, C and 4, now the result has to come from the 2nd table and searched in the cell located where the row and column names are C and 4, the value of c4t2.

Assumptions before formulas:
*name respective table data to Table1Data, Table2Data, Table3Data
**name respective table row name Table1Row, Table2Row, Table3Row
***name respective table column name Table1Column, Table2Column, Table3Column
**** I have to give out a result of "No data!" if the located value is 0.

Formula for selecting data from 1 table:
=IF(INDEX(Table1Data;MATCH(D7;Table1Column;0);MATCH(D5;Table1Row;0))=0;"No data!";INDEX(Table1Data;MATCH(D7;Table1Column;0);MATCH(D5;Table1Row;0)))

Now I had to implement the 1st variable - table name into formula. I tried to do it with If function like this:
=IF(D3=”Table1”;IF(INDEX(Table1Data;MATCH(D7;Table1Column;0);MATCH(D5;Table1Row;0))=0;"No data!";INDEX(Table1Data;MATCH(D7;Table1Column;0);MATCH(D5;Table1Row;0)));IF(D3=”Table2”; IF(INDEX(Table2Data;MATCH(D7;Table2Column;0);MATCH(D5;Table2Row;0))=0;"No data!";INDEX(Table2Data;MATCH(D7;Table2Column;0);MATCH(D5;Table2Row;0)));IF(D3=”Table3”; IF(INDEX(Table3Data;MATCH(D7;Table3Column;0);MATCH(D5;Table3Row;0))=0;"No data!";INDEX(Table3Data;MATCH(D7;Table3Column;0);MATCH(D5;Table3Row;0))))))

It now only gives #Name error.

Any help would be really appreciated. Since I can't upload an attachment please tell me if you understand the problem.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
1st variable:Table2
2nd variable:c
3rd variable:4
Result:4ct2
Table1
abcdef
11at11bt11ct11dt11et11ft1
22at102ct12dt12et12ft1
33at13bt103dt103ft1
44at14bt14ct14dt14et14ft1
55at105ct15dt15et15ft1
66at16bt16ct16dt16et10
Table2
abcdef
11at21bt21ct21dt21et21ft2
22at202ct202et22ft2
33at23bt23ct23dt203ft2
44at24bt204dt24et24ft2
55at25bt25ct25dt25et25ft2
66at206ct26dt26et26ft2
Table3
abcdef
11at31bt31ct31dt301ft3
22at32bt32ct32dt32et32ft3
33at303ct33dt33et33ft3
44at34bt304dt34et34ft3
55at35bt35ct35dt35et35ft3
66at306ct36dt36et30

<tbody>
</tbody>

Just to give a look of previously mentioned tables. If there is any more data I can help with, please ask.
 
Upvote 0
You can do it with a few named ranges and a formula like this.

Where:
A8 is a drop down with a list of the Index's named ranges.
A9 is a drop down rows named range (1,2,3,4... down the left side of Index)
A10 ia a drop down of columns named range (a,b,c,d,e... across the top of the Index)

=INDEX(INDIRECT(A8),MATCH(A9,Tb1Row,0),MATCH(A10,Tb1Col,0))

Here is a link to a sheet with a demo.

https://www.dropbox.com/s/r98p4z3aigyvu5z/Index Match x three.xlsm?dl=0

Howard
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,629
Members
449,241
Latest member
NoniJ

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