Home |
Search |
Today's Posts |
#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 |
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 |