+ Reply to Thread
Results 1 to 3 of 3

Resorting full names

  1. #1
    Jim Sigurdson
    Guest

    Resorting full names

    I need to resort names in a cell from John & Jane Doe to Doe, John & Jane.

    The formulas discussed in previous threads work if there are just a first
    and last name in the cell, but not if there are several names as above. Does
    anyone have a formula that will work? Thanks.

  2. #2
    Elkar
    Guest

    RE: Resorting full names

    This formula will work, based on 2 assumptions. First, there are no tildes
    (~) in any of your names. Second, the last name is always the last word
    following the last space.

    =MID(A1,FIND("~",SUBSTITUTE(A1," ","~",LEN(A1)-LEN(SUBSTITUTE(A1,"
    ",""))))+1,1024)&", "&LEFT(A1,FIND("~",SUBSTITUTE(A1,"
    ","~",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)

    Now, there are spaces in the formula, and I'm not sure what this will look
    like when it posts. Usually, line breaks will be inserted where the spaces
    are, so you may need to adjust accordingly.

    HTH,
    Elkar

    "Jim Sigurdson" wrote:

    > I need to resort names in a cell from John & Jane Doe to Doe, John & Jane.
    >
    > The formulas discussed in previous threads work if there are just a first
    > and last name in the cell, but not if there are several names as above. Does
    > anyone have a formula that will work? Thanks.


  3. #3
    Jim Sigurdson
    Guest

    RE: Resorting full names

    This works perfectly. A million thanks Elkar! JS

    "Elkar" wrote:

    > This formula will work, based on 2 assumptions. First, there are no tildes
    > (~) in any of your names. Second, the last name is always the last word
    > following the last space.
    >
    > =MID(A1,FIND("~",SUBSTITUTE(A1," ","~",LEN(A1)-LEN(SUBSTITUTE(A1,"
    > ",""))))+1,1024)&", "&LEFT(A1,FIND("~",SUBSTITUTE(A1,"
    > ","~",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)
    >
    > Now, there are spaces in the formula, and I'm not sure what this will look
    > like when it posts. Usually, line breaks will be inserted where the spaces
    > are, so you may need to adjust accordingly.
    >
    > HTH,
    > Elkar
    >
    > "Jim Sigurdson" wrote:
    >
    > > I need to resort names in a cell from John & Jane Doe to Doe, John & Jane.
    > >
    > > The formulas discussed in previous threads work if there are just a first
    > > and last name in the cell, but not if there are several names as above. Does
    > > anyone have a formula that will work? Thanks.


+ 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