LOOKUP 3 tables different size

GerryZ

Well-known Member
Joined
Jul 4, 2014
Messages
1,224
Office Version
  1. 365
Platform
  1. Windows
Hello Everybody
As you can see I've 3 table with different size
than in A24, A25, A26 I've 3 dropdown list
I need the expected out come in A28
I want to be able that if I choose table 1, Than Horizzontal size 400, and vertical size 160
The result wil be 388
Just like in the example belowe
Thankyou!



Book1
ABCDEFGHI
1table1200300400500600700
21001381132100452240776
31201759217914921586
414087188402231192949
5160427472388136872463
6180175311387774108085
7table2100150200250
83011351417978514
96053131186478
1090629154510191509
11120452100319587
1215050211391551670
13180300134313666
1421015719355711107
15240459927336698
16table35001000150020002500300035004000
17502603795201813225153010131530
18100162786597575651174518451741
191501299180615119943849246191769
20200178112411611869168665316831974
21
22
23
24tabletable1
25Horizzontal size400
26vertical size160
27
28Result388
Foglio1
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Try this:
I had an extra empty row on top of my worksheet, so you will need to shift it one.

Code:
=INDEX(CHOOSE(RIGHT($B$25,1),$B$3:$G$7,$B$9:$E$16,$B$18:$I$21),MATCH($B$27,CHOOSE(RIGHT($B$25,1),$A$3:$A$7,$A$9:$A$16,$A$18:$A$21),0),MATCH($B$26,CHOOSE(RIGHT($B$25,1),$B$2:$G$2,$B$8:$E$8,$B$17:$I$17),0))
 
Last edited:
Upvote 0
You could also try to employ named ranges. Name your first table (A1:G6) "Table1"; your second table (A7:E15) "Table2"; and your third table (A16:I20) "Table3"

Now, in your Result formula in B28, limit that range of your Horizontal and Vertical lookup by the RANGE name in B24.
 
Upvote 0
@chicagocompuer
your formula works fine, but I made a mistake I should not write TABLE1, table2 and table 3 but the real name of the table, i know thats make the the different because the RIGHT function will be not usefull anymore
this is the real table

Book1
ABCDEFGHI
2finestra200300400500600700
31001381132100452240776
41201759217914921586
514087188402231192949
6160427472388136872463
7180175311387774108085
8porta scorrevole100150200250
93011351417978514
106053131186478
1190629154510191509
12120452100319587
1315050211391551670
14180300134313666
1521015719355711107
16240459927336698
17tapparelle5001000150020002500300035004000
18502603795201813225153010131530
19100162786597575651174518451741
201501299180615119943849246191769
21200178112411611869168665316831974
22
23
24
25tablefinestra
26Horizzontal size200
27vertical size180
28
29Result#VALORE!
Foglio1
Cell Formulas
RangeFormula
B29=INDEX(CHOOSE(RIGHT($B$25,1),$B$3:$G$7,$B$9:$E$16,$B$18:$I$21),MATCH($B$27,CHOOSE(RIGHT($B$25,1),$A$3:$A$7,$A$9:$A$16,$A$18:$A$21),0),MATCH($B$26,CHOOSE(RIGHT($B$25,1),$B$2:$G$2,$B$8:$E$8,$B$17:$I$17),0))
 
Upvote 0
=IF(B24="table1",INDEX(B2:G6,MATCH(B26,A2:A6,0),MATCH(B25,B1:G1,0)),IF(B24="table2",INDEX(B8:E15,MATCH(B26,A8:A15,0),MATCH(B25,B7:E7,0)),INDEX(B17:I20,MATCH(B26,A17:A20,0),MATCH(B25,B16:I16,0))))
 
Upvote 0
@Azumi
Your formula Works fine, but the problem is that I' ve 23 different tables, and your formula becaomes very very long
do you belive is there a better solution?
 
Upvote 0
@JMKnapp

I don't know what you mean, can you post a sample?
because would be interesting what you are sayng but I don't know how to apply
thank you!
 
Upvote 0
Thank You Chicagocomputerclasses and All
I will use Chicagocomputerclasses formula because is the shorter one
Thank you
 
Upvote 0
This could be a little too much, but I've figured out a way to do this with one large table instead of breaking it down into 3 separate tables.
This way you can keep adding as many tables as you want, you just have to make sure to update range end limits.

Code:
=INDEX(A1:I21,MATCH(B26,INDIRECT("A"&MATCH(B24,A1:A21,0)&":A"&MATCH(B24,A1:A21,0)+MATCH(1,TRANSPOSE(--NOT(ISNUMBER(INDIRECT("A"&MATCH(B24,A1:A20,0)+1&":A21")))),0)-1),0)+MATCH(B24,A1:A21,0)-1,MATCH(B25,INDIRECT(MATCH(B24,A1:A21,0)&":"&MATCH(B24,A1:A21,0)),0))
 
Upvote 0

Forum statistics

Threads
1,215,330
Messages
6,124,308
Members
449,152
Latest member
PressEscape

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