Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
VLOOKUP with IF logic
How do you write the following IF statement using vlookup functionality? Can
I use vlookup function imbedded in an IF statement for this scenario or is there another function to use? Look for project number in another worksheet (tab) (within the same workbook), if project is found (true) return the open date. Else if not found return the comment "no project found". Open date is stored/defined as <date,time. I think the IF statement with vlookup would be written in this manner but it's not working for me. =IF(VLOOKUP,B2,Sheet1!C2:C154,1,false),Sheet1!F2:F 154,"no project found") b2 = project number that vlookup is searching for on worksheet 1, range c2:c154 sheet1!f2:f154 = is where the open date would be found if the project is found on worksheet 1. Thanks, Rae |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
VLOOKUP with IF logic
I believe this will match what you need.
=IF(ISNA(VLOOKUP(B2,Sheet1!$C$2:$F$154,5,FALSE))," No Project Found",VLOOKUP(B2,Sheet1!$C$2:$F$154,5,FALSE)) -- ** John C ** "Rae" wrote: How do you write the following IF statement using vlookup functionality? Can I use vlookup function imbedded in an IF statement for this scenario or is there another function to use? Look for project number in another worksheet (tab) (within the same workbook), if project is found (true) return the open date. Else if not found return the comment "no project found". Open date is stored/defined as <date,time. I think the IF statement with vlookup would be written in this manner but it's not working for me. =IF(VLOOKUP,B2,Sheet1!C2:C154,1,false),Sheet1!F2:F 154,"no project found") b2 = project number that vlookup is searching for on worksheet 1, range c2:c154 sheet1!f2:f154 = is where the open date would be found if the project is found on worksheet 1. Thanks, Rae |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
VLOOKUP with IF logic
Try it this way:
=IF(ISNA(MATCH(B2,Sheet1!C$2:C$154,0)),"no project found",VLOOKUP(B2,Sheet1!C$2:F$154,4,0)) Hope this helps. Pete On Oct 29, 7:00*pm, Rae wrote: How do you write the following IF statement using vlookup functionality? *Can I use vlookup function imbedded in an IF statement for this scenario or is there another function to use? Look for project number in another worksheet (tab) (within the same workbook), if project is found (true) return the open date. *Else if not found return the comment "no project found". *Open date is stored/defined as <date,time. I think the IF statement with vlookup would be written in this manner but it's not working for me. =IF(VLOOKUP,B2,Sheet1!C2:C154,1,false),Sheet1!F2:F 154,"no project found") b2 = project number that vlookup is searching for on worksheet 1, range c2:c154 sheet1!f2:f154 = is where the open date would be found if the project is found on worksheet 1. Thanks, Rae |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
VLOOKUP with IF logic
Try this:
=IF(ISERROR(VLOOKUP(B2,Sheet1!C2:C154,1,FALSE)),"N o Project Found",VLOOKUP (B2,Sheet1!C2:C154,1,FALSE)) -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "Rae" wrote: How do you write the following IF statement using vlookup functionality? Can I use vlookup function imbedded in an IF statement for this scenario or is there another function to use? Look for project number in another worksheet (tab) (within the same workbook), if project is found (true) return the open date. Else if not found return the comment "no project found". Open date is stored/defined as <date,time. I think the IF statement with vlookup would be written in this manner but it's not working for me. =IF(VLOOKUP,B2,Sheet1!C2:C154,1,false),Sheet1!F2:F 154,"no project found") b2 = project number that vlookup is searching for on worksheet 1, range c2:c154 sheet1!f2:f154 = is where the open date would be found if the project is found on worksheet 1. Thanks, Rae |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
VLOOKUP with IF logic
Thank you John, your example worked.
I just have to remember to change the cell format to date when it returns a date instead of text. Rae "John C" wrote: I believe this will match what you need. =IF(ISNA(VLOOKUP(B2,Sheet1!$C$2:$F$154,5,FALSE))," No Project Found",VLOOKUP(B2,Sheet1!$C$2:$F$154,5,FALSE)) -- ** John C ** "Rae" wrote: How do you write the following IF statement using vlookup functionality? Can I use vlookup function imbedded in an IF statement for this scenario or is there another function to use? Look for project number in another worksheet (tab) (within the same workbook), if project is found (true) return the open date. Else if not found return the comment "no project found". Open date is stored/defined as <date,time. I think the IF statement with vlookup would be written in this manner but it's not working for me. =IF(VLOOKUP,B2,Sheet1!C2:C154,1,false),Sheet1!F2:F 154,"no project found") b2 = project number that vlookup is searching for on worksheet 1, range c2:c154 sheet1!f2:f154 = is where the open date would be found if the project is found on worksheet 1. Thanks, Rae |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
VLOOKUP with IF logic
You could just include the formatting with it, like so:
=TEXT(IF(ISNA(VLOOKUP(B2,Sheet1!$C$2:$F$154,4,FALS E)),"No Project Found",VLOOKUP(B2,Sheet1!$C$2:$F$154,4,FALSE)),"MM/DD/YY HH:MM AM/PM") -- ** John C ** Please remember if your question is answered, to mark it answered :). It helps everyone. "Rae" wrote: Thank you John, your example worked. I just have to remember to change the cell format to date when it returns a date instead of text. Rae "John C" wrote: I believe this will match what you need. =IF(ISNA(VLOOKUP(B2,Sheet1!$C$2:$F$154,5,FALSE))," No Project Found",VLOOKUP(B2,Sheet1!$C$2:$F$154,5,FALSE)) -- ** John C ** "Rae" wrote: How do you write the following IF statement using vlookup functionality? Can I use vlookup function imbedded in an IF statement for this scenario or is there another function to use? Look for project number in another worksheet (tab) (within the same workbook), if project is found (true) return the open date. Else if not found return the comment "no project found". Open date is stored/defined as <date,time. I think the IF statement with vlookup would be written in this manner but it's not working for me. =IF(VLOOKUP,B2,Sheet1!C2:C154,1,false),Sheet1!F2:F 154,"no project found") b2 = project number that vlookup is searching for on worksheet 1, range c2:c154 sheet1!f2:f154 = is where the open date would be found if the project is found on worksheet 1. Thanks, Rae |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need help with logic or Vlookup formula | Excel Worksheet Functions | |||
LOGIC | Excel Discussion (Misc queries) | |||
I Then logic help | Excel Worksheet Functions | |||
If Then logic not enough | Excel Discussion (Misc queries) | |||
IF THEN LOGIC | Excel Discussion (Misc queries) |