+ Reply to Thread
Results 1 to 10 of 10

switching last name/first name

  1. #1
    Registered User
    Join Date
    07-20-2009
    Location
    Roanoke, Tx
    MS-Off Ver
    Excel 2003
    Posts
    24

    switching last name/first name

    I have a column of cells that have the last name first then the first name. Example:

    C1
    Smith John

    Is there a formula/macro that can switch them all?

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: switching last name/first name

    Try

    =MID(C1,FIND(" ",C1),99)&" "&LEFT(C1,FIND(" ",C1)-1)

    hth

  3. #3
    Registered User
    Join Date
    07-20-2009
    Location
    Roanoke, Tx
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: switching last name/first name

    It works.....but I have to delete the original cell......anyway to copy it the new cell with just the information and not a formula?

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: switching last name/first name

    Well, you could use a temporary column for the formula, then copy the output of the temporary column and use Paste Special - Values to paste it back into column C, then finally delete the temporary column.

    cheers

  5. #5
    Registered User
    Join Date
    07-20-2009
    Location
    Roanoke, Tx
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: switching last name/first name

    Don't know if I need to do a new post for this or not but one last thing I need is I have a cell with address, city, state and zip but I need to take the city "whitney", the state and the zip code out of that cell and put them in their own cells. Example

    B1
    01467 Brookside Dr, Whitney TX 76692

    B1 C1 D1 E1
    01467 Brookside Dr Whitney TX 76692


    How can I do this?

  6. #6
    Banned User!
    Join Date
    12-09-2008
    Location
    planet earth
    Posts
    6

    Re: switching last name/first name

    Hi,
    this is a little tricky, but you could do it with several Text to Columns operations

    First text to column with Comma as the delimiter - that would leave you with two cells

    01467 Brookside Dr ----- Whitney TX 76692

    (where ----- is the column boundary)

    next, do text to column on the second column with space as the delimiter
    next, insert a few columns before the city and do a text to column on the first column, again with space as the delimiter
    finally, combine the second and third column with a concatenation and then copy and paste all columns the way you need them.

  7. #7
    Registered User
    Join Date
    07-20-2009
    Location
    Roanoke, Tx
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: switching last name/first name

    Well I was able to get the state and zip out of the cell but now have an issue trying to get the city out because what was separated with a comma was the city, state......not street, city. Whitney is now the last word in the cell though.....is there a formula that can just take out the last word in a cell and paste it into another one?

  8. #8
    Registered User
    Join Date
    07-20-2009
    Location
    Roanoke, Tx
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: switching last name/first name

    I posted my last response late last night but still need to know how I might do my last question. Any help?

  9. #9
    Registered User
    Join Date
    07-20-2009
    Location
    Roanoke, Tx
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: switching last name/first name

    Please please please......can someone help?

  10. #10
    Registered User
    Join Date
    10-11-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: switching last name/first name

    Assuming that what you have left is - 01467 Brookside Dr, Whitney - then maybe,

    Please Login or Register  to view this content.
    Of course change "C3" to the appropriate cell.
    Last edited by Evagrius; 10-31-2009 at 11:32 AM.

+ 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