+ Reply to Thread
Results 1 to 5 of 5

Seperate First, Middle and Last name to seperate columns

Hybrid View

  1. #1
    Registered User
    Join Date
    04-01-2014
    Location
    Kerala
    MS-Off Ver
    Excel 2007
    Posts
    7

    Thumbs up Seperate First, Middle and Last name to seperate columns

    Hi!

    i use MS Office 2007

    I have a column A containing FULL NAMES
    (which consists of :
    1. First name OR
    2. First Name and Last Name OR
    3. First Name, Middle and Last Name)

    I would be grateful if i could get the results in separate columns (i.e. column B= First Names; column C= Middle [return N/A - if MIDDLE not present]; column D= Last Name)

    appreciate your early reply
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,952

    Re: Seperate First, Middle and Last name to seperate columns

    First name
    =LEFT(A4,FIND(" ",A4)-1)
    Middle
    =IFERROR(MID(A4,FIND(" ",A4)+1,FIND("*",SUBSTITUTE(A4," ","*",2))-FIND(" ",A4)-1),"")
    Last
    =IF(ISERR(FIND("*",SUBSTITUTE(A4," ","*",2))),MID(A4,FIND(" ",A4)+1,LEN(A4)),RIGHT(A4,LEN(A4)-FIND("*",SUBSTITUTE(A4," ","*",2))))
    Ben Van Johnson

  3. #3
    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
    53,048

    Re: Seperate First, Middle and Last name to seperate columns

    Or just use Text2Columns, using space as the delimiter
    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

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,311

    Re: Seperate First, Middle and Last name to seperate columns

    Note: ProtonLeah's first formula needs an IFERROR to cater for a single name, that is, no space present.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,311

    Re: Seperate First, Middle and Last name to seperate columns

    @Ford: I had thought of suggesting that but it doesn't cope with a missing middle name.

+ 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. [SOLVED] Seperate inches into 2 seperate columns
    By RTech in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-08-2013, 11:42 AM
  2. [SOLVED] Macro to seperate worksheets to seperate workbooks fired from external excel file
    By optionone in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-26-2012, 01:25 PM
  3. Replies: 4
    Last Post: 11-17-2012, 03:19 AM
  4. Seperate Values in single cell seperated by [alt+enter] into seperate cells
    By Coquito in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2012, 04:24 PM
  5. [SOLVED] Seperate Comma seperated values in seperate rows in different tab of same worksheet
    By amlan009 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-28-2012, 04:54 AM

Tags for this Thread

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