IF Statement question

  • Thread starter Thread starter peg84
  • Start date Start date
P

peg84

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.
 
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.
 
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

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

IF Statement to input initials 2
Satisfying several criteria 4
if then formula 1
if then formula 2
Need Formula - If blank cells 3
Green triangle - text fields don't match. 2
Formula IF 1
Looking at multiple cells 3

Back
Top