Text entry help

S

SWEENEYfd

I have two columns of names (his & hers) and I would like to establish
a column with both names connected by "&". I have accomplished this but
would like to have just his name if there is no her.

Here is my current formula C2&" & "&E2

How can I eliminate the "7" and "E2 if there is a blank in E2

Thanks
 
E

Elkar

Try this:

=IF(C2<>"",C2,"")&IF(AND(C2<>"",E2<>"")," & ","")&IF(E2<>"",E2,"")

HTH,
Elkar
 
D

Dave Peterson

Another option:
=c2&if(e2="",""," & " & e2)

If you really are putting blanks (space characters) in E2, then you may want to
stop--it's a bad habit for most things.

but if you do...
=c2&if(trim(e2)="",""," & " & e2)
 

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

Top