ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Text entry help (https://www.excelbanter.com/excel-discussion-misc-queries/101761-text-entry-help.html)

[email protected]

Text entry help
 
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


Elkar

Text entry help
 
Try this:

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

HTH,
Elkar

" wrote:

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



johncassell

Text entry help
 

=IF(B1="",A1,A1&" & "&B1)

if cell a1 = john and b2 = sue then it will show john & sue but if only
john is there then it will just show john

regards

John


--
johncassell
------------------------------------------------------------------------
johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016
View this thread: http://www.excelforum.com/showthread...hreadid=565822


Dave Peterson

Text entry help
 
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)



wrote:

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


--

Dave Peterson

[email protected]

Text entry help
 
These solutions all worked and I thank you all.



All times are GMT +1. The time now is 04:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com