Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default OR Function in VLookup

I am trying to embed an OR function in a VLookup function, but am getting an
error message. Can someone help me out. I am trying to return a value based
on a particular look up value, but if that lookup value doesn't return
anything, I want it to look at another value in anothe adjacent cell. I was
thinking that an OR function would solve this problem, but am having
troubles.

Thanks,
Biff
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default OR Function in VLookup

Post your formula even if it's not working

Mike

"Biff" wrote:

I am trying to embed an OR function in a VLookup function, but am getting an
error message. Can someone help me out. I am trying to return a value based
on a particular look up value, but if that lookup value doesn't return
anything, I want it to look at another value in anothe adjacent cell. I was
thinking that an OR function would solve this problem, but am having
troubles.

Thanks,
Biff

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default OR Function in VLookup

Here you go.

=VLOOKUP(OR($C41,$H41),'[Model Summary -
Tamarac.xls]Input'!$C$5:$S$35,14,FALSE)



"Mike H" wrote:

Post your formula even if it's not working

Mike

"Biff" wrote:

I am trying to embed an OR function in a VLookup function, but am getting an
error message. Can someone help me out. I am trying to return a value based
on a particular look up value, but if that lookup value doesn't return
anything, I want it to look at another value in anothe adjacent cell. I was
thinking that an OR function would solve this problem, but am having
troubles.

Thanks,
Biff

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 913
Default OR Function in VLookup

On Fri, 2 Jan 2009 11:41:01 -0800, Biff
wrote:

I am trying to embed an OR function in a VLookup function, but am getting an
error message. Can someone help me out. I am trying to return a value based
on a particular look up value, but if that lookup value doesn't return
anything, I want it to look at another value in anothe adjacent cell. I was
thinking that an OR function would solve this problem, but am having
troubles.

Thanks,
Biff


A VLOOKUP function will always return something, maybe you mean by
"does'n return anything" that there is an error returned from the
VLOOKUP.

If so, you may try this code structu

IF(ISERROR( xxx ), yyy, xxx )

where xxx is your first VLOOKUP formula (that may return an error)
and yyy is your second, fallback, VLOOKUP formula.

Hope this helps / Lars-Åke
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default OR Function in VLookup

try using IF instead of OR. If you encounter any problem,
Post your database and your expected result in order
to eliminate guesswork.

HTH

--
If this posting was helpful, please click on the Yes button below

Thank You

cheers, francis









"Biff" wrote:

I am trying to embed an OR function in a VLookup function, but am getting an
error message. Can someone help me out. I am trying to return a value based
on a particular look up value, but if that lookup value doesn't return
anything, I want it to look at another value in anothe adjacent cell. I was
thinking that an OR function would solve this problem, but am having
troubles.

Thanks,
Biff



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default OR Function in VLookup

Hi,

You can check for an error on the first vlookup and if there is one run the
second

=IF(ISNA(VLOOKUP(C41,'[Model Summary -
Tamarac.xls]Input'!$C$5:$S$35,14,FALSE)),VLOOKUP(H41,'[Model Summary -
Tamarac.xls]Input'!$C$5:$S$35,14,FALSE),VLOOKUP(C41,'[Model Summary -
Tamarac.xls]Input'!$C$5:$S$35,14,FALSE))

Mike

"Biff" wrote:

Here you go.

=VLOOKUP(OR($C41,$H41),'[Model Summary -
Tamarac.xls]Input'!$C$5:$S$35,14,FALSE)



"Mike H" wrote:

Post your formula even if it's not working

Mike

"Biff" wrote:

I am trying to embed an OR function in a VLookup function, but am getting an
error message. Can someone help me out. I am trying to return a value based
on a particular look up value, but if that lookup value doesn't return
anything, I want it to look at another value in anothe adjacent cell. I was
thinking that an OR function would solve this problem, but am having
troubles.

Thanks,
Biff

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default OR Function in VLookup

Here is more detail:


A B C
1Column 1 Column 2 Return Value
2 A B 100

Table:

A B
10 Look Up Value Return Value
11 C 50
12 B 100
13 D 72
14 F 68

I am trying to get a formula that looks in both A2 and B2 for look up value
when going to the table. It shouldn't find both values in the table.

The formual I used is: =VLOOKUP(OR(A2,B2),A10:B14,2,FALSE)

Help?

"xlm" wrote:

try using IF instead of OR. If you encounter any problem,
Post your database and your expected result in order
to eliminate guesswork.

HTH

--
If this posting was helpful, please click on the Yes button below

Thank You

cheers, francis









"Biff" wrote:

I am trying to embed an OR function in a VLookup function, but am getting an
error message. Can someone help me out. I am trying to return a value based
on a particular look up value, but if that lookup value doesn't return
anything, I want it to look at another value in anothe adjacent cell. I was
thinking that an OR function would solve this problem, but am having
troubles.

Thanks,
Biff

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default OR Function in VLookup

Hi,

I am not comfortable with the column 1 containing "A B", is that really
what you have A followed by a bunch of spaces and then B?

If you have two values you want to check against the same table if the first
one is not found then

Replace
=VLOOKUP(OR(A2,B2),A10:B14,2,FALSE)
With
=IF(ISNA(VLOOKUP(A2,A10:B14,2,FALSE)),VLOOKUP(B2,A 10:B14,2,FALSE),VLOOKUP(A2,A10:B14,2,FALSE))

or in 2007

=IFERROR(VLOOKUP(A2,A10:B14,2,FALSE),VLOOKUP(B2,A1 0:B14,2,FALSE))

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Biff" wrote:

Here is more detail:


A B C
1Column 1 Column 2 Return Value
2 A B 100

Table:

A B
10 Look Up Value Return Value
11 C 50
12 B 100
13 D 72
14 F 68

I am trying to get a formula that looks in both A2 and B2 for look up value
when going to the table. It shouldn't find both values in the table.

The formual I used is: =VLOOKUP(OR(A2,B2),A10:B14,2,FALSE)

Help?

"xlm" wrote:

try using IF instead of OR. If you encounter any problem,
Post your database and your expected result in order
to eliminate guesswork.

HTH

--
If this posting was helpful, please click on the Yes button below

Thank You

cheers, francis









"Biff" wrote:

I am trying to embed an OR function in a VLookup function, but am getting an
error message. Can someone help me out. I am trying to return a value based
on a particular look up value, but if that lookup value doesn't return
anything, I want it to look at another value in anothe adjacent cell. I was
thinking that an OR function would solve this problem, but am having
troubles.

Thanks,
Biff

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default OR Function in VLookup

That worked. Thank you.

"Shane Devenshire" wrote:

Hi,

I am not comfortable with the column 1 containing "A B", is that really
what you have A followed by a bunch of spaces and then B?

If you have two values you want to check against the same table if the first
one is not found then

Replace
=VLOOKUP(OR(A2,B2),A10:B14,2,FALSE)
With
=IF(ISNA(VLOOKUP(A2,A10:B14,2,FALSE)),VLOOKUP(B2,A 10:B14,2,FALSE),VLOOKUP(A2,A10:B14,2,FALSE))

or in 2007

=IFERROR(VLOOKUP(A2,A10:B14,2,FALSE),VLOOKUP(B2,A1 0:B14,2,FALSE))

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Biff" wrote:

Here is more detail:


A B C
1Column 1 Column 2 Return Value
2 A B 100

Table:

A B
10 Look Up Value Return Value
11 C 50
12 B 100
13 D 72
14 F 68

I am trying to get a formula that looks in both A2 and B2 for look up value
when going to the table. It shouldn't find both values in the table.

The formual I used is: =VLOOKUP(OR(A2,B2),A10:B14,2,FALSE)

Help?

"xlm" wrote:

try using IF instead of OR. If you encounter any problem,
Post your database and your expected result in order
to eliminate guesswork.

HTH

--
If this posting was helpful, please click on the Yes button below

Thank You

cheers, francis









"Biff" wrote:

I am trying to embed an OR function in a VLookup function, but am getting an
error message. Can someone help me out. I am trying to return a value based
on a particular look up value, but if that lookup value doesn't return
anything, I want it to look at another value in anothe adjacent cell. I was
thinking that an OR function would solve this problem, but am having
troubles.

Thanks,
Biff

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default OR Function in VLookup

=IF(ISNA(VLOOKUP(A2,A10:B14,2,FALSE)),VLOOKUP(B2, A10:B14,2,FALSE),VLOOKUP(A2,A10:B14,2,FALSE))

That can be reduced to:

=VLOOKUP(IF(COUNTIF(A10:A14,A2),A2,B2),A10:B14,2,0 )


--
Biff
Microsoft Excel MVP


"Shane Devenshire" wrote in
message ...
Hi,

I am not comfortable with the column 1 containing "A B", is that
really
what you have A followed by a bunch of spaces and then B?

If you have two values you want to check against the same table if the
first
one is not found then

Replace
=VLOOKUP(OR(A2,B2),A10:B14,2,FALSE)
With
=IF(ISNA(VLOOKUP(A2,A10:B14,2,FALSE)),VLOOKUP(B2,A 10:B14,2,FALSE),VLOOKUP(A2,A10:B14,2,FALSE))

or in 2007

=IFERROR(VLOOKUP(A2,A10:B14,2,FALSE),VLOOKUP(B2,A1 0:B14,2,FALSE))

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Biff" wrote:

Here is more detail:


A B C
1Column 1 Column 2 Return Value
2 A B 100

Table:

A B
10 Look Up Value Return Value
11 C 50
12 B 100
13 D 72
14 F 68

I am trying to get a formula that looks in both A2 and B2 for look up
value
when going to the table. It shouldn't find both values in the table.

The formual I used is: =VLOOKUP(OR(A2,B2),A10:B14,2,FALSE)

Help?

"xlm" wrote:

try using IF instead of OR. If you encounter any problem,
Post your database and your expected result in order
to eliminate guesswork.

HTH

--
If this posting was helpful, please click on the Yes button below

Thank You

cheers, francis









"Biff" wrote:

I am trying to embed an OR function in a VLookup function, but am
getting an
error message. Can someone help me out. I am trying to return a
value based
on a particular look up value, but if that lookup value doesn't
return
anything, I want it to look at another value in anothe adjacent cell.
I was
thinking that an OR function would solve this problem, but am having
troubles.

Thanks,
Biff



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
Embedded If Function in a Vlookup Function Excel Student Excel Worksheet Functions 2 January 13th 07 04:39 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
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION CHAIM Excel Worksheet Functions 1 July 27th 05 09:10 PM
how do I write a vlookup function within an iserror function so t. JBLeeds Excel Worksheet Functions 2 March 16th 05 10:30 AM
I want to use Vlookup function and AND function in a single formu. prakash Excel Worksheet Functions 3 January 25th 05 07:11 AM


All times are GMT +1. The time now is 02:05 PM.

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

About Us

"It's about Microsoft Excel"