+ Reply to Thread
Results 1 to 8 of 8

Function to switch last and first names leaving out a suffix

  1. #1
    Registered User
    Join Date
    12-07-2014
    Location
    north carolina, Usa
    MS-Off Ver
    2013
    Posts
    3

    Function to switch last and first names leaving out a suffix

    Hello!

    I have tried every function I have found to switch the name order but I cannot figure out how to leave off the Suffix.

    My cell has the text "Mr. Dave Smiths", I need to come up with a function to have it read "Smiths, Dave" in a separate column, leaving off the "Mr."

    I have a long column I need to be able to copy the formula down through.

    Any ideas?

    Thank you!
    Last edited by mattsgirl614; 12-07-2014 at 01:19 AM.

  2. #2
    Registered User
    Join Date
    10-31-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    11

    Re: Function to switch last and first names leaving out a suffix

    Use "Text to columns" to disintegrate words using space as separator and then use "Concatenate" formula to stitch words as you want.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Function to switch last and first names leaving out a suffix

    Try this formula in B1

    =TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",25)),25))&", "&TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",25)),25,25))

    Row\Col
    A
    B
    1
    Mr. Dave Smiths Smiths, Dave
    Last edited by AlKey; 12-07-2014 at 01:48 AM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    12-07-2014
    Location
    north carolina, Usa
    MS-Off Ver
    2013
    Posts
    3

    Re: Function to switch last and first names leaving out a suffix

    That worked perfect on the first cell, but when I tried to copy it down the column, the other first names had more letters, and they would only show the first four letters of their first names, I'm not sure what I'm doing wrong :/ Thank you for your help!


    Quote Originally Posted by AlKey View Post
    Try this formula in B1

    =RIGHT(A1,LEN(A1)-FIND(" ",A1,FIND(" ",A1)+1))&", "&MID(A1,FIND(" ",A1)+1,FIND(" ",A1))

    Row\Col
    A
    B
    1
    Mr. Dave Smiths Smiths, Dave

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Function to switch last and first names leaving out a suffix

    Sorry, try updated formula in my original post.

  6. #6
    Registered User
    Join Date
    12-07-2014
    Location
    north carolina, Usa
    MS-Off Ver
    2013
    Posts
    3

    Re: Function to switch last and first names leaving out a suffix

    That worked perfect, thank you so much!

    Quote Originally Posted by AlKey View Post
    Sorry, try updated formula in my original post.

  7. #7
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Function to switch last and first names leaving out a suffix

    Another tough one..you don't want to get rid of names, but MsRsmith might get butchered so...I would suggest a search an repllace of all the common suffixes first (Ms.,Mr., Messr,...basically any common suffixes and variations, (this can use the program's tools or; the various searh and replace formulas available on THIS site) then you nee to clean up any missed variations of such...this will not be easy as everyone inputs those differentlt (some May capitalize or not, some may put a "." or not; etc....)... it is not an easy task, especially without using VBA...
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Function to switch last and first names leaving out a suffix

    You're welcome and thank you for the feedback!

    Please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools -> Mark thread as Solved).

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 08-14-2014, 06:29 AM
  2. [SOLVED] have list of names and want to switch names around by putting the first initial last
    By ctc75 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-10-2014, 01:09 PM
  3. [SOLVED] Changing a positive or negative value based on the input's suffix, then removing suffix
    By Theredwind in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-06-2014, 05:19 AM
  4. [SOLVED] Switch names in cell
    By tjtjjtjt in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-27-2005, 03:05 PM
  5. [SOLVED] How do I switch names around in excel?
    By Erin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-08-2005, 01:06 PM

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