+ Reply to Thread
Results 1 to 3 of 3

splitting text string into different columns

Hybrid View

  1. #1
    Registered User
    Join Date
    11-13-2013
    Location
    Boulder, CO
    MS-Off Ver
    Excel 2010
    Posts
    1

    Exclamation splitting text string into different columns

    I have a large data set of info in one column that I need separated into multiple columns. Can't use the "Text to Columns" tool because the text is not delimited nor fixed. Here is an example of some of the cells:
    "Mary R. Anderson1865 W Choke Cherry DriveLouisville CO 80027"
    "Sandy Andrews801 Meadowlark CoveLafayette CO 80026"
    "Vujka ""VaVa"" S. Andrick4559 Beechcomber CourtBoulder CO 80301"
    "Gaynel K. Andrusko3178 Eastwood CourtBoulder CO 80304"

    I need these separated into columns for first name, last name, address, city, state, zip

    Help!

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: splitting text string into different columns

    Unless you can define a reliable structure pattern that we can use to parse the text, I doubt there is a formulaic or VBA solution you can have confidence in. Perhaps you can have the system that generated the list create something you can work with.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: splitting text string into different columns

    I can see how to extract the name from the address (so long as all addresses start with a #), then extract the state and ZIP from there...

    But I have no idea how you would expect to separate the city from the address. I'm stumped.

    Assuming your data is in A1, you can use this to extract the name:
    Formula: copy to clipboard
    =LEFT(A1,MIN(FIND({0,1,2,3,4,5,6,7,8,9},A1&{0,1,2,3,4,5,6,7,8,9}))-1)
    To extract the State, you could use:
    Formula: copy to clipboard
    =LEFT(RIGHT(A1,8),2)
    and for the ZIP:
    Formula: copy to clipboard
    =RIGHT(A1,5)
    - Moo
    * Ultimately, I would suggest what Ron said above - find out if the system can output the data into a normalized data set (with some sort of delimiter preferably!)
    Last edited by Moo the Dog; 11-13-2013 at 05:15 PM.

+ 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] Splitting string and distributing to columns with VBA (conditional)
    By knutfh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-04-2013, 05:02 PM
  2. Replies: 6
    Last Post: 03-18-2013, 05:30 PM
  3. Problems splitting a text & number string using VBA
    By Tamor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-22-2009, 11:03 AM
  4. Splitting cells into multiple columns by specific string
    By KrNpRiDe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-17-2009, 12:36 PM
  5. [SOLVED] Splitting a text string into string and number
    By mcambrose in forum Excel General
    Replies: 4
    Last Post: 02-21-2006, 11:50 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