Vlookup with either/or

  • Thread starter Thread starter ttholschuh
  • Start date Start date
T

ttholschuh

Hi,
I'm hoping someone can help me out with what should be an easy task,
but I can't quite get it.
I'm trying to do a Vlookup for 2 columns (either/or) using this
formula:

=VLOOKUP(OR(A18,B18),data1,4,FALSE)

where 'data1' is my array on a separate sheet. It works fine for a
single vlookup, but no luck using the 'or' function.

Does anyone know how to do this?
Thanks in advance for any replies.

Terry
 
This not an allowed syntax.
You need 2 VLOOKUPs.
You 'll also have to think about which one has "the right of way".
You can check for no match with the ISNA() function.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| Hi,
| I'm hoping someone can help me out with what should be an easy task,
| but I can't quite get it.
| I'm trying to do a Vlookup for 2 columns (either/or) using this
| formula:
|
| =VLOOKUP(OR(A18,B18),data1,4,FALSE)
|
| where 'data1' is my array on a separate sheet. It works fine for a
| single vlookup, but no luck using the 'or' function.
|
| Does anyone know how to do this?
| Thanks in advance for any replies.
|
| Terry
 
This not an allowed syntax.
You need 2 VLOOKUPs.
You 'll also have to think about which one has "the right of way".
You can check for no match with the ISNA() function.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


| Hi,
| I'm hoping someone can help me out with what should be an easy task,
| but I can't quite get it.
| I'm trying to do a Vlookup for 2 columns (either/or) using this
| formula:
|
| =VLOOKUP(OR(A18,B18),data1,4,FALSE)
|
| where 'data1' is my array on a separate sheet.  It works fine for a
| single vlookup, but no luck using the 'or' function.
|
| Does anyone know how to do this?
| Thanks in advance for any replies.
|
| Terry

Thanks for the info. Neik ... I will do 2 loopkups, just thought I
could combine them somehow.
Appreciate your input~!
 
Back
Top