Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Embedded If Function in a Vlookup Function | Excel Worksheet Functions | |||
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP | Excel Discussion (Misc queries) | |||
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION | Excel Worksheet Functions | |||
how do I write a vlookup function within an iserror function so t. | Excel Worksheet Functions | |||
I want to use Vlookup function and AND function in a single formu. | Excel Worksheet Functions |