+ Reply to Thread
Results 1 to 4 of 4

Name swapping

  1. #1
    Registered User
    Join Date
    12-07-2014
    Location
    Australia
    MS-Off Ver
    2007 - 2013
    Posts
    2

    Name swapping

    Hi guys,

    New to the forum but its been very helpful previously.

    I know that this sort of question has been answered previously, but I am unable to locate anything to the extent that i require.

    I have a spreadsheet containing 8,000 Names in various formats.

    e.g.

    Citizen, John
    Citizen, John A
    Citizen, John A B

    The format I want is:

    John Citizen

    I have found multiple responses for names containing 1 initial but not 2 at the end of the name.

    Any assistance would be much appreciated!

    PS Looking for a formula but open to VBA

    Cheers
    Last edited by EgoBrain90; 04-28-2015 at 10:29 PM.

  2. #2
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Name swapping

    Welcome to the forum

    Try this

    =MID(A1,FIND(",",A1)+2,IFERROR(FIND(" ",A1,FIND(" ",A1)+1)-FIND(" ",A1),LEN(A1)-FIND(" ",A1)))& " " & LEFT(A1,FIND(",",A1)-1)
    Happy with my advice? Click on the * reputation button below

  3. #3
    Registered User
    Join Date
    12-07-2014
    Location
    Australia
    MS-Off Ver
    2007 - 2013
    Posts
    2

    Re: Name swapping

    Thanks Crooza - works a treat!

    It does add a couple extra spaces but its nothing a hidden trim wont fix. Thanks mate!

  4. #4
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Name swapping

    Woops.

    Try this it should remove that extra space

    =MID(A1,FIND(",",A1)+2,IFERROR(FIND(" ",A1,FIND(" ",A1)+1)-FIND(" ",A1)-1,LEN(A1)-FIND(" ",A1))) &" "& LEFT(A1,FIND(",",A1)-1)

+ 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. swapping rows
    By lgbingham in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-20-2013, 04:40 PM
  2. Swapping cell value
    By lavi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2010, 03:21 AM
  3. Data Swapping on the fly
    By jabryantiii in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-03-2010, 05:02 PM
  4. swapping cells?
    By mlecho in forum Excel General
    Replies: 5
    Last Post: 08-28-2007, 09:23 AM
  5. Swapping two cells?
    By kzach in forum Excel General
    Replies: 1
    Last Post: 01-17-2005, 01:03 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