Solved Reverse lookup? (1 Viewer)

alcwho

New member
Local time
Today, 15:36
Joined
Sep 28, 2023
Messages
21
Hi, I have the following table for value lookup.

Actually, a user has 2 criteria, i) what Big group he is in; ii) what sub group he is in under the Big group. Then based on these 2 criteria, lookup what fruit he needs.

For example, User is in i) B-2 Big group; and ii) be-2 subgroup, then he needs Banana.

I don't know how to build the excel formula to get the result. It seems not using Index & Match function under this case. So I stuck in here.

Can anyone help me to solve this?

Thanks in advance :)


AppleAppleAppleBananaBananaBananaOrangeOrangeOrange
A-1aa-1ab-1ac-1ad-1ae-1af-1ag-1ah-1ai-1
B-2ba-2bb-2bc-2bd-2be-2bf-2bg-2bh-2bi-2
C-3ca-3cb-3cc-3cd-3ce-3cf-3cg-3ch-3ci-3
D-4da-4db-4dc-4dd-4de-4df-4dg-4dh-4di-4
E-5ea-5eb-5ec-5ed-5ee-5ef-5eg-5eh-5ei-5
 

June7

AWF VIP
Local time
Yesterday, 23:36
Joined
Mar 9, 2014
Messages
5,472
Need the user parameters somewhere perhaps on same sheet:

IMNO
UserBig GroupSubgroupFruit
1B-2be-2Banana
2D-4dg-4Orange
3E-5ea-5Apple

Then formula in column O
=INDEX($B$1:$J$1,MATCH(N2,INDEX($B$2:$J$6,MATCH(M2,$A$2:$A$6,0),0),0))
 
Last edited:

alcwho

New member
Local time
Today, 15:36
Joined
Sep 28, 2023
Messages
21
Need the user parameters somewhere perhaps on same sheet:

IMNO
UserBig GroupSubgroupFruit
1B-2be-2Banana
2D-4dg-4Orange
3E-5ea-5Apple

Then formula in column O
=INDEX($A$1:$J$1,MATCH(N2,INDEX($A$2:$J$6,MATCH(M2,A$2:$A$6,0),0),0))

Thanks for your help. Let me take a look :)
 

June7

AWF VIP
Local time
Yesterday, 23:36
Joined
Mar 9, 2014
Messages
5,472
Since subgroup is unique in example, BigGroup value is not needed to identify column.
=INDEX($B$1:$J$1,SUMPRODUCT(MAX(($B$2:$J$6=N2)*(COLUMN($B$2:$J$6))))-COLUMN($B$2)+1)

Or this version which is an array formula.
{=INDEX($B$1:$J$1,MAX(IF($B$2:$J$6=N2,COLUMN($B$2:$J$6)))-COLUMN($B$2)+1)}
 

Users who are viewing this thread

Top Bottom