+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Switching within a column

  1. #1
    Registered User
    Join Date
    02-17-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Red face Switching within a column

    This may be a very "newbie" question but here goes.

    I have a column with "lastname, firstname" within the same column. Is there a way to switch the text within the column to "firstname lastname"

    Thanks in advance for any help.

    ~Tracy

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Switching within a column

    Try this in B1:

    =MID(A1,FIND(",",A1)+1,256)&" "&LEFT(A1,FIND(",",A1)-1)

    If A1="Barak, Obama", B1 will be "Obama Barak"
    Quang PT

  3. #3
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Switching within a column

    Assuming text in A1:
    =TRIM(MID(A1&" "&A1,FIND(",",A1)+1,LEN(A1)))
    in another column. You can then copy that down the column, and then copy and paste special-values over the top to remove the formula.
    Good luck.

  4. #4
    Registered User
    Join Date
    02-17-2012
    Location
    Virginia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Red face Re: Switching within a column

    Thank you, that did the trick!

    Now, is there a way to get the result copied into a newly created column without the formula? Text only?

    Thank you!!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Switching within a column

    Highlight all the data, copy, and paste as values to the new column (paste...or paste special.../paste values)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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