Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
=IF(AND(OR statement needed? bracket89 Excel Worksheet Functions 2 March 16th 07 02:13 AM
Help needed would this be an IF statement pano Excel Worksheet Functions 5 February 11th 07 06:37 PM
Another IF statement needed Connie Martin Excel Worksheet Functions 4 November 16th 06 08:56 PM
Help with IF statement needed Paul B. Excel Worksheet Functions 5 August 28th 06 05:19 PM
If Statement - Help Needed Portuga Excel Discussion (Misc queries) 4 January 24th 06 04:26 PM


All times are GMT +1. The time now is 02:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"