0

I'm trying to make an expandable formula to match values from 3 columns to a table that has 4 columns, and take the 4th value of the matched row:

Table 1:

A    B    C

0    1    0
1    0    1   <-- matching this row
1    1    0

Table 2:

D    E    F    G

0    0    0    1
1    0    1    0.5   <-- expecting 0.5
1    1    1    1

And I'm using this test formula for VLOOKUP:

=VLOOKUP(A2&B2&C2, $D$1:$G$3, 4)

This however returns N/A even though 1 0 1 exists in Table 2

9
  • Use INDEX() & MATCH() or If you are O365 user than use XLOOKUP() Function with VLOOKUP() you cant concatenate and use it in that way Commented Apr 24, 2022 at 17:50
  • @Mayukh Bhattacharya I followed this example and it seems to work for them for some reason. Commented Apr 24, 2022 at 17:51
  • in the said example it worked because Reference the Lookup Value in table 2 is already concatenated where as in your example it is nt hence its not working. Commented Apr 24, 2022 at 17:55
  • 2
    So for your query the formula should be =INDEX($G$1:$G$3,MATCH(1,(A2=$A$1:$A$3)*(B2=$B$1:$B$3)*(C2=$C$1:$C$3),0)) Or, =XLOOKUP(1,(A2=$A$1:$A$3)*(B2=$B$1:$B$3)*(C2=$C$1:$C$3),$G$1:$G$3,"None") Commented Apr 24, 2022 at 18:06
  • 1
    Provided options by Mayukh are the better ones, justed wanted to show that the logic you used can also be used in VLOOKUP in the following way: =VLOOKUP(A2&B2&C2,CHOOSE({1,2},$D$1:$D$3&$E$1:$E$3&$F$1:$F$3,$G$1:$G$3),2,0) note that this only if your data is always 1 character and all 3 columns are filled for all, otherwise there's the risk for false matches. Best to use the solutions from Mayukh. Commented Apr 24, 2022 at 19:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.