Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF statement needed
How would I write this IF statement:
If C2 begins with 4 put "P", if C2 begins with 7 put "S", otherwise put nothing? Thank you so much. Connie |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF statement needed
Try this:
=IF(LEFT(C2,1)="4","P",IF(LEFT(C2,1)="7","S","")) Hope this helps. Pete On Dec 10, 8:35 pm, Connie Martin wrote: How would I write this IF statement: If C2 begins with 4 put "P", if C2 begins with 7 put "S", otherwise put nothing? Thank you so much. Connie |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF statement needed
=IF(LEFT(C2)="4","P",IF(LEFT(C2)="7","S",""))
-- David Biddulph "Connie Martin" wrote in message ... How would I write this IF statement: If C2 begins with 4 put "P", if C2 begins with 7 put "S", otherwise put nothing? Thank you so much. Connie |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF statement needed
This should do it.
=IF(LEFT(C2,1)="4","P",IF(LEFT(C2,1)="7","S","")) -- Best Regards, Luke M "Connie Martin" wrote: How would I write this IF statement: If C2 begins with 4 put "P", if C2 begins with 7 put "S", otherwise put nothing? Thank you so much. Connie |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF statement needed
Luke, Pete and David, thank you so much! You all had the same answer and it
works fabulously. Connie "Connie Martin" wrote: How would I write this IF statement: If C2 begins with 4 put "P", if C2 begins with 7 put "S", otherwise put nothing? Thank you so much. Connie |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF statement needed
Your welcome. Thanks for the feedback!
-- Best Regards, Luke M "Connie Martin" wrote: Luke, Pete and David, thank you so much! You all had the same answer and it works fabulously. Connie "Connie Martin" wrote: How would I write this IF statement: If C2 begins with 4 put "P", if C2 begins with 7 put "S", otherwise put nothing? Thank you so much. Connie |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF statement needed
You're welcome, Connie. I'd made it slightly shorter by using just
LEFT(C2), rather than LEFT(C2,1), but the result should be the same. -- David Biddulph "Connie Martin" wrote in message ... Luke, Pete and David, thank you so much! You all had the same answer and it works fabulously. Connie "Connie Martin" wrote: How would I write this IF statement: If C2 begins with 4 put "P", if C2 begins with 7 put "S", otherwise put nothing? Thank you so much. Connie |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
=IF(AND(OR statement needed? | Excel Worksheet Functions | |||
Help needed would this be an IF statement | Excel Worksheet Functions | |||
Another IF statement needed | Excel Worksheet Functions | |||
Help with IF statement needed | Excel Worksheet Functions | |||
If Statement - Help Needed | Excel Discussion (Misc queries) |