+ Reply to Thread
Results 1 to 4 of 4

Formula to move text in order for first name first and last name last

  1. #1
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    Formula to move text in order for first name first and last name last

    I have a list of names that I am trying to change the names around so they'll be in order, First name then last name, not last name and first name. Some of the names are a business and don't have a comma. For those I would like them to just say the business name.

    In Column "B" is my list of names. I want Column "C" to show me the result. I can change the names around in the manner I want, the problem is I don't know how to make it do a name without a comma. It gives me an error when it finds a name without a comma. Again, for those I just want it to show me the name in the order it is shown. Thanks in advance,

    Here is the formula I am using. I am sure there is something better.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: Formula to move text in order for first name first and last name last

    You could just add an Iferror() function to the beginning of the formula, like so:

    =IFERROR(IF(B2="","",MID($B2,FIND(",",$B2)+1,256)&" "&LEFT(B2,(FIND(",",B2,1)-1))),B2)

    If there is no " , " then it throws back the #VALUE!, so Iferror knows if there is an error then copy the current list as is.

  3. #3
    Forum Contributor
    Join Date
    01-06-2015
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    185

    Re: Formula to move text in order for first name first and last name last

    Thank you dosydos. This was exactly what I needed.

  4. #4
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: Formula to move text in order for first name first and last name last

    glad to help. Thanks for the rep

+ 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. IF I CHOOSE TEXT FORMULA SHOULD MOVE VALUE To ANOTHER SHEET
    By tsikara in forum Excel Formulas & Functions
    Replies: 21
    Last Post: 05-11-2017, 10:32 AM
  2. Formula to move text to beginning of cell
    By yankeekid86 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-27-2016, 10:08 AM
  3. Replies: 4
    Last Post: 10-14-2013, 10:15 AM
  4. Replies: 0
    Last Post: 03-19-2013, 12:23 AM
  5. Replies: 0
    Last Post: 06-03-2010, 01:11 PM
  6. [SOLVED] how to convert a formula into text in order to display the formula
    By Claudio Hartzstein in forum Excel General
    Replies: 2
    Last Post: 07-13-2006, 05:05 AM
  7. Replies: 3
    Last Post: 10-21-2005, 01:05 AM

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