Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default IF Statement question


Something is wrong with my formula below and I am hoping someone can
help me.

=IF(B1=" "," ",((LEFT(B1,1)&".")))

The formula should direct it so that if the cell B1 is blank, then this
cell (C1) should be blank as well. Otherwise, put the 1st letter of B1
and a "." It puts the "." regardless. How do I fix this.

What I am shooting for is to get the last initial if I have the last
name, but to leave blank if I don't.




--
peg84
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default IF Statement question

too many parentheses, try
=IF(B1=" "," ",LEFT(B1,1)&".")
peg84 wrote:

Something is wrong with my formula below and I am hoping someone can
help me.

=IF(B1=" "," ",((LEFT(B1,1)&".")))

The formula should direct it so that if the cell B1 is blank, then this
cell (C1) should be blank as well. Otherwise, put the 1st letter of B1
and a "." It puts the "." regardless. How do I fix this.

What I am shooting for is to get the last initial if I have the last
name, but to leave blank if I don't.





  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 310
Default IF Statement question

Change your formula to this...
=IF(B1="","",LEFT(B1,1)&".")

The previous way you had it you were checking if the cell had a space, not
if it was blank. If you leave the space out between the quotes you will get
the result you want. Hope that helps.

--
Cheers,
Michelle
"Anyone who says he can see through women is missing a lot." Groucho Marx


"peg84" wrote:


Something is wrong with my formula below and I am hoping someone can
help me.

=IF(B1=" "," ",((LEFT(B1,1)&".")))

The formula should direct it so that if the cell B1 is blank, then this
cell (C1) should be blank as well. Otherwise, put the 1st letter of B1
and a "." It puts the "." regardless. How do I fix this.

What I am shooting for is to get the last initial if I have the last
name, but to leave blank if I don't.




--
peg84

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default IF Statement question

You are not testing for an empty cell, you are tesing for a cell with a
space in it. Try:

=IF(B1="","",=IF(B1="","",LEFT(B1,1)&".")

or:

=IF(ISBLANK(B1),"",LEFT(B1,1)&".")


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"peg84" wrote in message
...

Something is wrong with my formula below and I am hoping someone can
help me.

=IF(B1=" "," ",((LEFT(B1,1)&".")))

The formula should direct it so that if the cell B1 is blank, then this
cell (C1) should be blank as well. Otherwise, put the 1st letter of B1
and a "." It puts the "." regardless. How do I fix this.

What I am shooting for is to get the last initial if I have the last
name, but to leave blank if I don't.




--
peg84



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 statement question ranvin56 Excel Discussion (Misc queries) 2 December 12th 07 12:41 AM
IF statement question KarenH Excel Worksheet Functions 5 June 23rd 06 09:17 PM
IF then statement question ChuckW Excel Discussion (Misc queries) 2 February 24th 06 04:30 PM
IF Statement Question Scott Excel Worksheet Functions 15 June 14th 05 07:56 PM
If Statement Question mimmson Excel Worksheet Functions 5 May 27th 05 10:19 PM


All times are GMT +1. The time now is 12:46 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"