+ Reply to Thread
Results 1 to 8 of 8

Split data into separate columns

  1. #1
    Registered User
    Join Date
    11-23-2016
    Location
    USA
    MS-Off Ver
    2016
    Posts
    13

    Split data into separate columns

    Hi, i have a column of data (sample below) within my Excel data i would like to split into three:

    Bessemer AL 35022
    Mobile IA 56608
    Leoncavallo CA 82115
    Tanner MO 46801
    Huntsville OK 75805

    i would like the city state and zip in three separate Columbus.
    i can someone help?

    thanks

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Split data into separate columns

    With data in A1 down

    in B1

    =TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",99)),(COLUMNS($A:A)-1)*99+1,99))

    Copy across to D

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Split data into separate columns

    if you don't want to use a formula then just use the text to columns feature using space as the delimiter.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Split data into separate columns

    Alternatively, the Text to columns command (delimited with space as delimiter) should accomplish this as well.

    If Google sheets is an allowable alternative, I think this is a good opportunity to use their SPLIT() function (not yet available in Excel, unless you write your own UDF based on the VBA Split() function).
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Registered User
    Join Date
    11-23-2016
    Location
    USA
    MS-Off Ver
    2016
    Posts
    13

    Re: Split data into separate columns

    Thank you, the text to columns feature worked just fine.

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Split data into separate columns

    Glad it worked for you and thanks for the rep!

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Split data into separate columns

    Although suggested formula will work fine with town names with one word it will fail if the town names have two or three words.
    Use this formula
    Enter in B1 and copy across and down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D
    1 Bessemer AL 35022 Bessemer AL 35022
    2 Mobile IA 56608 Mobile IA 56608
    3 Leoncavallo CA 82115 Leoncavallo CA 82115
    4 Tanner MO 46801 Tanner MO 46801
    5 Huntsville OK 75805 Huntsville OK 75805
    6 Plant City FL 33565 Plant City FL 33565
    7 Saint Petersburg FL 33701 Saint Petersburg FL 33701
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Split data into separate columns

    Here's another formula option.

    Assumes the zip codes will always be the 5 digit codes.

    Data Range
    A
    B
    C
    D
    15
    Pittsburgh PA 15225
    Pittsburgh
    PA
    15225
    16
    Beaver Falls PA 15010
    Beaver Falls
    PA
    15010
    17
    Rochester PA 15074
    Rochester
    PA
    15074
    18
    Fond Du Lac WI 54935
    Fond Du Lac
    WI
    54935


    This formula entered in B15:

    =LEFT(A15,LEN(A15)-9)

    This formula entered in C15:

    =MID(A15,LEN(B15)+2,2)

    This formula entered in D15:

    =RIGHT(A15,5)

    Select B15:D15 and copy down as needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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] split one column data into two separate columns
    By alipezu in forum Excel General
    Replies: 1
    Last Post: 04-17-2016, 03:29 AM
  2. [SOLVED] How do I split the date & time into two separate columns?
    By bananajelly in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 09-22-2014, 03:26 PM
  3. Split Data based on 3 Columns into separate worksheets
    By angeleenmc in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-29-2014, 12:40 PM
  4. Replies: 1
    Last Post: 07-03-2012, 05:49 PM
  5. Split date into 3 separate columns
    By paulr24 in forum Excel General
    Replies: 4
    Last Post: 01-25-2012, 01:51 PM
  6. Excel 2007 : Split Cell Contents into Separate Columns
    By slkamath in forum Excel General
    Replies: 1
    Last Post: 01-01-2010, 12:52 AM
  7. Replies: 2
    Last Post: 09-24-2009, 06:51 AM

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