Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Vlookup with either/or

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default Vlookup with either/or

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

wrote in message ...
| 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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Vlookup with either/or

On Sep 17, 11:02*am, "Niek Otten" wrote:
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

wrote in ...

| 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~!
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Vlookup with either/or

=IF(COUNTIF(data1,A18),VLOOKUP(A18,data1,4,),VLOOK UP(B18,data1,4,))


" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Vlookup with either/or

On Sep 17, 11:16*am, Teethless mama
wrote:
=IF(COUNTIF(data1,A18),VLOOKUP(A18,data1,4,),VLOOK UP(B18,data1,4,))

" wrote:
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 Teethless Mama! That worked exactly like I needed!


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Vlookup with either/or

You're Welcome!

"TH" wrote:

On Sep 17, 11:16 am, Teethless mama
wrote:
=IF(COUNTIF(data1,A18),VLOOKUP(A18,data1,4,),VLOOK UP(B18,data1,4,))

" wrote:
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 Teethless Mama! That worked exactly like I needed!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM
IF(AND(val1=VLOOKUP( );val2>=VLOOKUP( );val2<=VLOOKUP( );VLOOKUP( Oso Excel Worksheet Functions 2 January 26th 05 06:56 AM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"