Three Way Lookup, with a Hard Twist. Please Help!

Disturbed

New Member
Joined
Jan 7, 2014
Messages
7
KnownAB
Look up tableXYZ
A
A1
2.5
AB211
AC0.250
BA211
BB.541
BC212

<tbody>
</tbody>

That's the basic layout of what I have. Now what I am looking for is a Formula that I can use the 2 known A and B to find the A | B row.
Than off of that row to find the maximum within the row.
Finally to give me the name of the column that the max number is in.

Example- using A | B the max number would be 2, than column is X

If someone could figure out how to do that in a 1 cell formula or even 2-3 step formulas to come out with the right answer I would be grateful.
 
Is there a way to trouble shoot the formula? because it works on the model there but once i scale it to the size of the actual one it doesn't error but it just gives me 1 of the columns. And the column it gave was not the max or even the min.

Thanks a bunch in advance, That is the way i wanted to go with it, I did forget about same maxes.
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Is there a way to trouble shoot the formula? because it works on the model there but once i scale it to the size of the actual one it doesn't error but it just gives me 1 of the columns. And the column it gave was not the max or even the min.

Thanks a bunch in advance, That is the way i wanted to go with it, I did forget about same maxes.

The formula should be ok. Would you post the scaled up version you implemented?
 
Upvote 0
The formula should be ok. Would you post the scaled up version you implemented?

ABCDEFGHIJKLMNOPQRKnownCD
AA111111211111101111
AB 10.5210.50.5212110.520110.50.5Result(s)
AC10.50.5220.521111110110.51
AD1110.5112120.51110110.51
AE 120.50.50.52220.5212101111
AF121110.5411111201121
AG111111211220.50.5010.512
AH11110.5110.52120.5101110.5
AI 11202220.511110.501111
AJ11120.52110110.5201111
AK11111111110.52101211
AL12110.51110.5211201111
AM0.50.5212120.520.511101121
AN 01111100.51110.5101211
AO10.50.50.50.52211111102112
AP1111114111021010.512
AQ0.52110.50.54020.50.50.50.500.510.50.5
AR 111111121110.51000.521
BA10.5210.50.5112110.521110.50.5
BB 10.5210.50.5212110.520110.50.5
BC10.251210.25112110.521110.250.5
BD10.520.50.50.51140.510.521110.250.5
BE 1110.50.25112121121110.50.5
BF11210.50.25212110.5411110.5
BG10.5210.50.5112220.251110.50.51
BH10.5210.250.50.50.54120.2521110.50.25
BI 10.5401110.52110.511110.50.5
BJ10.5220.2510.510110.2541110.50.5
BK10.5210.50.50.51210.5122120.50.5
BL11210.250.50.511210.541110.50.5
BM0.50.254110.520.540.510.5211110.5
BN 00.5210.50.500.52110.2522120.50.5
BO10.2510.50.251112110.521210.51
BP10.5210.50.521210120.510.50.51
BQ0.51210.250.252040.50.50.25110.510.250.25
BR 10.5210.50.50.522110.252100.510.5
CA11120.520.510110.5211111
CB 11120.52110110.5201111
CC10.5220.2510.510110.2541110.50.5
CD10.50.54110.510110.521110.51
CE 11110.520.5100.510.521110.51
CF120.510.2540.520211211111
CG12120.51110110.5411121
CH11120.520.510220.251110.512
CI 11120.2520.250.50120.25211110.5
CJ1120140.50.50110.5111111
CK11120.520.251010.51221211
CL12120.2520.2510210.5411111
CM0.50.5221210.500.510.5211121
CN 01120.5200.50110.25221211
CO10.50.510.2540.510110.5212112
CP11120.5211010120.510.512
CQ0.52120.2511000.50.50.25110.510.50.5
CR 11120.520.2520110.252100.521
DA11110.510.50.52120.5111110.5
DB 11110.5110.52120.5101110.5
DC10.5210.250.50.50.54120.2521110.50.25
DD10.50.5210.50.50.52120.511110.50.5
DE 1110.50.510.50.540.520.511110.50.5
DF120.50.50.2520.511221111110.5
DG12110.50.510.52120.5211120.5
DH11110.510.50.52240.250.5110.511
DI 1120120.50.252120.50.511110.5
DJ11120.2520.250.50120.25211110.5
DK11110.510.250.52111121210.5
DL12110.2510.250.51220.5211110.5
DM0.50.5211110.2540.520.5111120.5
DN 01110.5100.252120.25121210.5
DO10.50.50.50.2520.50.52120.5112111
DP11110.5110.5210110.510.511
DQ0.52110.250.51040.510.250.510.510.50.25
DR 11110.510.2512120.251100.520.5
EA11202210.511110.511111
EB 11202220.511110.501111
EC10.5401110.52110.511110.50.5
ED10.5104110.511110.51110.51
EE 11202210.520.5110.51110.51
EF121014110.52120.511111
EG12202120.51111111121
EH11202210.51220.50.25110.512
EI 1120120.50.252120.50.511110.5
EJ1120140.50.50110.5111111
EK1120220.50.5110.520.521211
EL1220120.50.50.5211111111
EM0.50.5404220.2520.5110.511121
EN 01202200.251110.50.521211
EO10.5101410.511110.512112
EP11202220.511020.50.510.512
EQ0.5220112020.50.50.50.2510.510.50.5
ER 1120220.511110.50.5100.521
F A120.50.50.52120.5212111111
F B 120.50.50.52220.5212101111
F C1110.50.25112121121110.50.5
F D110.25111120.521211110.51
F E 120.50.250.5212111211110.51
F F140.50.50.51220.5212211121
F G120.50.50.52120.54210.5110.512
F H120.50.50.2520.511221111110.5
F I 121014110.52120.511111
F J120.510.2540.520211211111
F K120.50.50.520.520.520.54121211
F L140.50.50.2520.520.25412211111
F M0.5110.512211112111121
F N 020.50.50.52010.5211121211
F O110.250.250.254120.5211112112
F P120.50.50.52220.520410.510.512
F Q0.540.50.50.25120110.510.510.510.50.5
F R 120.50.50.520.540.52111100.521
GA12110.510.510.5211211111
GB 12110.51110.5211201111
GC11210.250.50.511210.541110.50.5
GD110.5210.50.510.521121110.51
GE 1210.50.510.51111121110.51
GF140.50.50.2520.520.25412211111
GG14110.50.5110.5211411121
GH12110.510.510.5420.51110.512
GI 12110.2510.250.51220.5211110.5
GJ1220120.50.50.5211111111
GK12120.2520.2510210.5411111
GL12110.510.2510.520.52221211
GM0.51211110.51111211121
GN 02110.5100.50.5210.5221211
GO110.50.50.2520.510.5211212112
GP12110.51110.520220.510.512
GQ0.54110.250.510110.50.5110.510.50.5
GR 12110.510.2520.5210.52100.521
HA121110.5211111211121
HB 121110.5411111201121
HC11210.50.25212110.5411110.5
HD110.5220.25211111211111
HE 1210.510.52120.511211111
HF140.50.50.51220.5212211121
HG121110.5211220.51110.522
HH12110.50.510.52120.5211120.5
HI 12202120.51111111121
HJ12120.51110110.5411121
HK121110.511110.52221221
HL14110.50.5110.5211411121
HM0.512120.540.520.511211141
HN 02110.5000.51110.5221221
HO110.50.50.51211111212122
HP121110.541110220.510.522
HQ0.54110.50.254020.50.50.5110.5110.5
HR 121110.5121110.52100.541
I A1110.5111120.51111110.51
I B 1110.5112120.51110110.51
I C10.520.50.50.51140.510.521110.250.5
I D10.50.5120.51120.51111110.251
I E 120.50.250.5212111211110.51
I F1210.510.52120.511211111
I G1110.511112120.50.5110.50.52
I H1110.50.510.50.540.520.511110.50.5
I I 11202210.520.5110.51110.51
I J11110.520.5100.510.521110.51
I K1110.5110.5120.50.5212120.51
I L1210.50.510.51111121110.51
I M0.50.520.52120.540.2511111111
I N 0110.51100.520.510.512120.51
I O10.50.50.250.521120.51111210.52
I P1110.5112120.50210.510.50.52
I Q0.5210.50.50.52040.250.50.50.510.510.250.5
I R 1110.5110.5220.510.51100.511
JA1111110.51110.52121211
JB 11111111110.52101211
JC10.5210.50.50.51210.5122120.50.5
JD10.50.5220.50.51110.5212120.51
JE 1110.5110.5120.50.5212120.51
JF120.50.50.520.520.520.54121211
JG121110.511110.52221221
JH1111110.5112110.521112
JI 11110.510.250.52111121210.5
JJ1120220.50.5110.520.521211
JK11120.510.251010.51221211
JL12110.510.2510.520.52221211
JM0.50.5212110.520.50.52121221
JN 01111100.5110.51141411
JO10.50.50.50.520.51110.52122212
JP111111111104111112
JQ0.52110.50.51020.50.2510.520.520.50.5
JR 1111110.252110.51120121
KA10.50.5220.511111111110.51
KB 10.50.5220.521111110110.51
KC10.251210.25112110.521110.250.5
KD10.50.5120.51120.51111110.251
KE 110.25111120.521211110.51
KF110.5220.25211111211111
KG10.50.5220.5111220.50.5110.50.52
KH10.50.5210.50.50.52120.511110.50.5
KI 10.5104110.511110.51110.51
KJ10.50.54110.510110.521110.51
KK10.50.5220.50.51110.5212120.51
KL110.5210.50.510.521121110.51
KM0.50.251240.520.520.511111111
KN 00.50.5220.500.51110.512120.51
KO10.250.2511111111111210.52
KP10.50.5220.521110210.510.50.52
KQ0.510.5210.252020.50.50.50.510.510.250.5
KR 10.50.5220.50.521110.51100.511
LA1111110.521110.51100.521
LB 111111121110.51000.521
LC10.5210.50.50.522110.252100.510.5
LD10.50.5220.50.521110.51100.511
LE 1110.5110.5220.510.51100.511
LF120.50.50.520.540.52111100.521
LG121110.5121110.52100.541
LH1111110.521220.250.5100.2522
LI 11110.510.2512120.251100.520.5
LJ1120220.511110.50.5100.521
LK11120.520.2520110.252100.521
LL1111110.252110.51120121
LM12110.510.2520.5210.52100.521
LN 0.50.521211120.510.51100.541
LO011111011110.25120121
LP10.50.50.50.520.521110.51100.522
LQ11111112110110.500.2522
LR 0.52110.50.51020.50.50.250.5100.510.5
MA111111111220.50.5110.512
MB 111111211220.50.5010.512
MC10.5210.50.5112220.251110.50.51
MD10.50.5220.5111220.50.5110.50.52
ME 1110.511112120.50.5110.50.52
MF120.50.50.52120.54210.5110.512
MG121110.5211220.51110.522
MH11110.510.50.52240.250.5110.511
MI 11202210.51220.50.25110.512
MJ11120.520.510220.251110.512
MK1111110.5112110.521112
ML12110.510.510.5420.51110.512
MM0.50.5212120.52120.50.5110.522
MN 01111100.51220.250.521112
MO10.50.50.50.52111220.50.5120.514
MP1111112112010.50.510.2514
MQ0.52110.50.5202110.250.2510.50.50.51
MR 1111110.521220.250.5100.2522
NA0.52110.50.52020.50.50.50.510.510.50.5
NB 0.52110.50.54020.50.50.50.500.510.50.5
NC0.51210.250.252040.50.50.25110.510.250.25
ND0.510.5210.252020.50.50.50.510.510.250.5
NE 0.5210.50.50.52040.250.50.50.510.510.250.5
NF0.540.50.50.25120110.510.510.510.50.5
NG0.54110.50.254020.50.50.5110.5110.5
NH0.52110.50.5202110.250.2510.50.50.51
NI 0.52110.250.51040.510.250.510.510.50.25
NJ0.5220112020.50.50.50.2510.510.50.5
NK0.52120.2511000.50.50.25110.510.50.5
NL0.52110.50.51020.50.2510.520.520.50.5
NM0.54110.250.510110.50.5110.510.50.5
NN 0.2512110.54040.250.50.50.510.5110.5
NO02110.50.50020.50.50.250.520.520.50.5
NP0.510.50.50.2512020.50.50.50.51110.51
NQ0.52110.50.54020.5010.50.50.50.50.51
NR 0.52110.50.51020.50.50.250.5100.510.5
OA11111121110210.510.512
OB 1111114111021010.512
OC10.5210.50.521210120.510.50.51
OD10.50.5220.521110210.510.50.52
OE 1110.5112120.50210.510.50.52
OF120.50.50.52220.520410.510.512
OG121110.541110220.510.522
OH1111112112010.50.510.2514
OI 11110.5110.5210110.510.511
OJ11202220.511020.50.510.512
OK11120.5211010120.510.512
OL111111111104111112
OM12110.51110.520220.510.512
ON 0.50.5212140.520.50210.510.522
OO01111100.51101111112
OP10.50.50.50.5221110210.520.514
OQ0.52110.50.54020.5010.50.50.50.50.51
OR 11111112110110.500.2522
PA10.50.50.50.52111111112112
PB 10.50.50.50.52211111102112
PC10.2510.50.251112110.521210.51
PD10.250.2511111111111210.52
PE 10.50.50.250.521120.51111210.52
PF110.250.250.254120.5212112112
PG110.50.50.51211111212122
PH10.50.50.50.52111220.50.5120.514
PI 10.50.50.50.2520.50.52120.5112111
PJ10.5101410.511110.512112
PK10.50.510.2540.510110.5212112
PL10.50.50.50.520.51110.52122212
PM110.50.50.2520.510.5211212112
PN 0.50.2510.51220.520.511112122
PO00.50.50.50.5200.51110.5122212
PP10.50.50.50.5221110210.520.514
PQ0.510.50.50.2512020.50.50.50.51110.51
PR 10.50.50.50.520.521110.51100.522
QA01111100.51110.5121211
QB 01111100.51110.5101211
QC00.5210.50.500.52110.2522120.50.5
QD00.50.5220.500.51110.512120.51
QE 0110.51100.520.510.512120.51
QF020.50.50.52010.5211121211
QG021110.500.51110.5221221
QH01111100.51220.250.521112
QI 01110.5100.252120.25121210.5
QJ01202200.251110.50.521211
QK01120.5200.50110.25221211
QL01111100.5110.51141411
QM02110.5100.50.5210.5221211
QN 00.5212100.2520.510.5121221
QO00.50.50.50.5200.51110.5122212
QP01111100.51101111112
QQ02110.50.50020.50.50.250.520.520.50.5
QR 011111011110.25120121
R A0.50.5212120.520.511111121
R B 0.50.5212140.520.511101121
R C0.50.254110.520.540.510.5211110.5
R D0.50.251240.520.520.511111111
R E 0.50.520.52120.540.2511111111
R F0.5110.512211112111121
R G0.512120.540.520.511211141
R H0.50.5212120.52120.50.5110.522
R I 0.50.5211110.2540.520.5111120.5
R J0.50.5404220.2520.5110.511121
R K0.50.5221210.500.510.5211121
R L0.50.5212110.520.50.52121221
R M0.51211110.51111211121
R N 00.5212100.2520.510.5121221
R O0.50.2510.51220.520.511112122
R P0.50.5212140.520.50210.510.522
R Q0.2512110.54040.250.50.50.510.5110.5
R R 0.50.521211120.510.51100.541

<colgroup><col span="24"></colgroup><tbody>
</tbody>

<tbody>
</tbody>

That's the scaled up version.

And i did mess around with size a tad yesterday, was working good till I got to the size above than it just relayed B no matter what.
 
Upvote 0
[...]
That's the scaled up version.

And i did mess around with size a tad yesterday, was working good till I got to the size above than it just relayed B no matter what.

Good testing...

W3, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IFERROR(INDEX($C$1:$T$1,SMALL(IF($A$2:$A$325=$W$1,IF($B$2:$B$325=$X$1,
  IF($C$2:$T$325=MAX(INDEX($C$2:$T$325,
  MATCH(1,IF($A$2:$A$325=$W$1,IF($B$2:$B$325=$X$1,1)),0),0)),
  COLUMN($C$1:$T$1)-COLUMN($C$1)+1))),ROWS($W$3:W3))),"")
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

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