+ Reply to Thread
Results 1 to 4 of 4

Split out text after each incidence of a comma

  1. #1
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Split out text after each incidence of a comma

    Good afternoon,

    I want to place different parts of an address into separate columns that appear after each comma

    Address Line 1
    Address Line 2
    Address Line 3
    Address Line 4 (If Applicable)

    Example Text

    123 The Street, Sevenoaks, Kent

    I know this can be done by performing a text to columns but I want to do this outside of this.

    Currently I am using this for the 1st part of the address

    Please Login or Register  to view this content.
    And this for the last part

    Please Login or Register  to view this content.
    But I need something for the middle parts

    I don't mind having a separate code in each column to pull the data out

    Regards

    DJ

  2. #2
    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 out text after each incidence of a comma

    Try this formula

    In B1 and pull it to the right until you see blanks

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


    A
    B
    C
    D
    1
    123 The Street, Sevenoaks, Kent 123 The Street Sevenoaks Kent
    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

  3. #3
    Forum Contributor
    Join Date
    08-24-2006
    Location
    Sevenoaks, Kent
    MS-Off Ver
    Office 365 ProPlus
    Posts
    459

    Re: Split out text after each incidence of a comma

    Brilliant thank you

  4. #4
    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 out text after each incidence of a comma

    You're welcome and thank you for the feedback!

+ 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 comma separated text and insert into next row retaining all other columns.
    By saidineshbabu in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-17-2013, 03:25 AM
  2. Replies: 4
    Last Post: 07-25-2013, 05:28 AM
  3. Find and remove all text to the left of last comma (including comma) in a cell
    By Excelrookie_1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-05-2013, 08:47 AM
  4. Split Column at comma
    By KarambaStar in forum Excel General
    Replies: 5
    Last Post: 04-11-2008, 12:45 PM
  5. How to split a value seperated by comma?
    By Ticktockman in forum Excel General
    Replies: 2
    Last Post: 03-23-2006, 12:25 PM

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