+ Reply to Thread
Results 1 to 3 of 3

Data Re-arrange

  1. #1
    Registered User
    Join Date
    11-27-2006
    Posts
    4

    Data Re-arrange

    Hi, I have a list of names such as:

    SAARI Mohd Fadzli
    SALAMAN Norizam
    SYED HUSSEIN Syed Adney

    and so on, each name is in a unique cell, The capitalised part is the surname and the lowercase the first name; I need to have each name in a unique cell with all names Title case with first name first and surname second, so the results are:

    Mohd Fadzli Saari
    Norizam Salaman
    Syed Adney Syed Hussein

    Is there any way this can be done as a formula or macro? I am having problems as there is more than one word making up each name part? Thanks in advance

  2. #2
    Forum Contributor
    Join Date
    02-15-2005
    Location
    Central UK
    MS-Off Ver
    Office 365
    Posts
    175

    Not sure if this is what you want

    If you select the column containing the text and from the Data menu select "Text to columns".

    This will give the option to split the names based on a space between each name - bear in mind that it will fill the columns to the right so if you have other information in those columns ensure you insert a few extra columns before using the text to columns option.

    Hope it helps

    Cheers

    Tony

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    This site might help if your still stuck but only for first, middle and last names.

    http://www.cpearson.com/excel/FirstLast.htm

    Mod formulas

    =LEFT(A2,IF(ISERROR(FIND(" ",A2,1)),LEN(A2),FIND(" ",A2,1)-1))

    =TRIM(IF(ISERROR(FIND(" ",A2,1)),A2,MID(A2,FIND(" ",A2,1)+1,IF(ISERROR(FIND(" ",A2,FIND(" ",A2,1)+2)),LEN(A2),FIND(" ",A2,FIND(" ",A2,1)+2))-FIND(" ",A2,1))))

    =TRIM(RIGHT(A2,LEN(A2)-IF(ISERROR(FIND(" ",A2,FIND(" ",A2,FIND(" ",A2,1)+2))),LEN(A2),FIND(" ",A2,FIND(" ",A2,FIND(" ",A2,1)+2))-1)))

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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