+ Reply to Thread
Results 1 to 5 of 5

Text entry help

  1. #1

    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


  2. #2
    Forum Contributor
    Join Date
    07-07-2005
    Location
    England
    MS-Off Ver
    Office 2019 Enterprise
    Posts
    464
    =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

  3. #3
    Elkar
    Guest

    RE: Text entry help

    Try this:

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

    HTH,
    Elkar

    "[email protected]" 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
    >
    >


  4. #4
    Dave Peterson
    Guest

    Re: 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)



    [email protected] 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

  5. #5

    Re: Text entry help

    These solutions all worked and I thank you all.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1