+ Reply to Thread
Results 1 to 6 of 6

Extracting multiple names from a cell

  1. #1
    Registered User
    Join Date
    01-06-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2010
    Posts
    12

    Extracting multiple names from a cell

    Hi All,

    I have a spreadhseet with a column that contains contact names. The cells contain multiple names (between 2 and 4 names in each cell) e.g 'Mr J Smith, Mrs A Brown, Miss J White'. I need to write a formula to extract all of the names into seperate cells.

    I've managed to extract the first name using the following formula

    =LEFT(text, SUM(FIND(",",text)-1))

    With the above example, this would give me 'Mr J Smith'

    I'm struggling to then extract the second/third/fourth names into seperate cells. Does anyone have any suggestions?

    Thanks,

    Tom

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Extracting multiple names from a cell

    hi Tom. assuming text is in A1, you can try:
    =TRIM(MID(SUBSTITUTE($A1,",",REPT(" ",100)),1+((COLUMN(A1)-1)*100),100))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Extracting multiple names from a cell

    Where did you get that formula from!

    If they are all like your examples:
    A1 = Mr J Smith
    In B1: =LEFT(A1,FIND(" ",A1)-1)
    In C1: =MID(A1,FIND(" ",A1)+1,FIND(" ",A1,FIND(" ",A1)+1)-1-FIND(" ",A1))
    In D1: =RIGHT(A1,LEN(A1)-FIND(" ",A1,FIND(" ",A1)+1))

    Or use Text to Columns on the Data Tab

  4. #4
    Registered User
    Join Date
    01-06-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Extracting multiple names from a cell

    Quote Originally Posted by Kevin UK View Post
    Or use Text to Columns on the Data Tab
    Haha. Thanks. That's great!

  5. #5
    Registered User
    Join Date
    01-06-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Extracting multiple names from a cell

    Thanks both for your help.
    Tom

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Extracting multiple names from a cell

    @ Cleland

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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