Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Combining IF with VLOOKUP
I am using Excel 2003. I would like to be able to lookup a value in a list.
What the lookup returns will be determined by whether or not there is an "X" in one of the columns. For example, it will look up item 123 and if item 123 (in column A) has an "X" in the column beside it, the data returned will be from columns C and D. If the item does not have an "X" in the column beside it, the data returned will be from columns E and F. I am not sure how to string together VLOOKUP with IF. Thank you, Ricki |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Combining IF with VLOOKUP
Hi,
First point is that in general you only return data from one column at a time with VLOOKUP, not from column C and D at once. The basic formula would be =IF(VLOOKUP(A1,Sheet2!A1:F100,2,FALSE)="X",VLOOKUP (A1,Sheet2!A1:F100,3,FALSE),VLOOKUP(A1,Sheet2!A1:F 100,5,FALSE)) or a shorter variation: =VLOOKUP(A1,Sheet2!A1:F100,IF(VLOOKUP(A1,Sheet2!A1 :F100,2,FALSE)="X",3,5),FALSE) -- If this helps, please click the Yes button. Cheers, Shane Devenshire "Ricki Miles" wrote: I am using Excel 2003. I would like to be able to lookup a value in a list. What the lookup returns will be determined by whether or not there is an "X" in one of the columns. For example, it will look up item 123 and if item 123 (in column A) has an "X" in the column beside it, the data returned will be from columns C and D. If the item does not have an "X" in the column beside it, the data returned will be from columns E and F. I am not sure how to string together VLOOKUP with IF. Thank you, Ricki |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Combining IF with VLOOKUP
Thank you, Shane. I will give it a try,
Ricki "Shane Devenshire" wrote in message ... Hi, First point is that in general you only return data from one column at a time with VLOOKUP, not from column C and D at once. The basic formula would be =IF(VLOOKUP(A1,Sheet2!A1:F100,2,FALSE)="X",VLOOKUP (A1,Sheet2!A1:F100,3,FALSE),VLOOKUP(A1,Sheet2!A1:F 100,5,FALSE)) or a shorter variation: =VLOOKUP(A1,Sheet2!A1:F100,IF(VLOOKUP(A1,Sheet2!A1 :F100,2,FALSE)="X",3,5),FALSE) -- If this helps, please click the Yes button. Cheers, Shane Devenshire "Ricki Miles" wrote: I am using Excel 2003. I would like to be able to lookup a value in a list. What the lookup returns will be determined by whether or not there is an "X" in one of the columns. For example, it will look up item 123 and if item 123 (in column A) has an "X" in the column beside it, the data returned will be from columns C and D. If the item does not have an "X" in the column beside it, the data returned will be from columns E and F. I am not sure how to string together VLOOKUP with IF. Thank you, Ricki |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combining Hlookup and vlookup | Excel Worksheet Functions | |||
Is there any way of combining vlookup with getpivotdata? | Excel Worksheet Functions | |||
VLOOKUP & Combining Worksheets - Please HELP | Excel Worksheet Functions | |||
Combining VLOOKUP functions | Excel Worksheet Functions | |||
combining VLOOKUP and IF | Excel Worksheet Functions |