How do I use vlookup with two lookup values?
Thanks for your help Sandy!
Very much appreciated!
Have a nice day,
Chris
" wrote:
pinpalchris wrote:
Hi,
I tried most of the posts for vlookup, but wasn't successful. Here's my
problem:
Best way is to concatenate both criteria in a temporary column and use
the normal vlookup function
ColumnA | ColumnB | ColumnC | ColumnD
Tokyo | Vancouver | TokyoVancouver | 200
Singapore | Vancouver | SingaporeVancouver | 100
Singapore | Seattle | SingaporeSeattle | 150
I have separated columns by " | " symbol
Now I have added a temporary column in column C.
Formula in C2 should be =CONCATENATE(A2,B2)
Formula in C3 should be =CONCATENATE(A3,B3)
Formula in C4 should be =CONCATENATE(A4,B4)
Now if A7 has "Singapore" and B7 has "Vancouver" and if you want to
find the rate in D7, then use this formula,
=VLOOKUP(CONCATENATE(A7,B7),C1:D4,2,FALSE)
Sandy
|