+ Reply to Thread
Results 1 to 5 of 5

Adress split into seperate columns

  1. #1
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    270

    Adress split into seperate columns

    Hello All
    Looking for some assistance. I have tried Text to columns function, but not working quite the way I thought due to missing commas etc
    I am simply looking for splitting an address in a column to seperate columns in to reflect Cite ,state , and zip. Attached is an example
    Thank you
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Adress split into seperate columns

    Hi Ron,

    Those line breaks are really Char(10) and you need to split using them. Read this site to see:
    https://www.ablebits.com/office-addi...-string-excel/
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Adress split into seperate columns

    Here are some formulas that work with your limited sample:

    C2 (Address) =LEFT(B2,FIND(CHAR(10),B2)-1)

    D2 (Address 2) =IF(LEN(B2)-LEN(SUBSTITUTE(B2,CHAR(10),""))=2,TRIM(MID(SUBSTITUTE(B2,CHAR(10),REPT(" ",100)),100,100)),"")

    E2 (City) =SUBSTITUTE(TRIM(MID(SUBSTITUTE(B2,CHAR(10),REPT(" ",100)),IF(LEN(B2)-LEN(SUBSTITUTE(B2,CHAR(10),""))=2,200,100),100))," "&F2&" "&G2,"")

    F2 (State) =LEFT(RIGHT(B2,8),2)

    G2 (Zip) =RIGHT(B2,5)

  4. #4
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    270

    Re: Adress split into seperate columns

    Thanks Marvin P and falcon dude ! The formulas are amazing
    Much appreciated
    Ron

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Adress split into seperate columns

    Happy to help. Thanks for the rep!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Replies: 7
    Last Post: 08-12-2014, 10:40 AM
  2. [SOLVED] Splitting textstring (adress) into seperate columns
    By soli004 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2014, 01:01 PM
  3. Replies: 6
    Last Post: 05-09-2014, 03:05 AM
  4. Split Names Into Seperate Columns
    By ghenderson122 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-07-2012, 07:06 AM
  5. Replies: 9
    Last Post: 09-18-2008, 08:53 AM
  6. How to adress columns
    By adiman84 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-23-2008, 03:18 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