View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default VLOOKUP USING 2 LOOK UP VALUES

vlookup only accepts one value. You could either create another column in
your table that comines the two columns (ex: in C1: =A1&";"&B1) then embed a
similar concatenation in your lookup
(=vlookup(A1&";"&B1,table_cols_3_and_4,2,false). Or, if the combination of A
and B is always unique and you're returning a numeric value, you could use
sumproduct:
=sumproduct(--(table_column1=A1),--(table_column2=B1),table_column3)

"Jay Trull" wrote:


I am trying to use VLOOKUP for both columns A&B and I get the "#value!"
error in the cell with the formula. This is the formula I am using:
=VLOOKUP(A1:B1,table_array,3,false) If I use just column A:
=VLOOKUP(A1,table_array,3,false) it works but I get 0.14 as the result. How
do I write this so I can lookup both A&B. Thanks

A B C
RA-2 20 0.14
RA-2 30 0.17
RA-2 40 0.2
RA-2 50 0.22
RA-2 60 0.24
RA-4 20 0.28
RA-4 30 0..35
etc. etc. etc..