+ Reply to Thread
Results 1 to 8 of 8

Seperating single cell addresses into multiple columns

  1. #1
    Registered User
    Join Date
    02-21-2013
    Location
    melbourne, victoria
    MS-Off Ver
    2010
    Posts
    28

    Seperating single cell addresses into multiple columns

    Hello,

    I've been given a list of 10'000 addresses, each in a single cell in its own row. I need to separate them into 4 rows: Unit Number, Street Number, Street name and Street type. This would be simple if address contained the same amount of spaces to separate them with however some addresses is a unit it contains an extra space to separate the unit number from the street number.

    If I could use text to columns to separate pushing data to the left instead of the right this would be pretty easy but I don't believe its possible. I'm fairly certain I'll have to do a lot of the grunt work myself but any ideas would be great. I've tried setting the last column to filter out all but blanks and then pasting one row to the right but the data doesn't paste straight right due to hidden columns etc

    Excel 2010 btw Example_photo.png
    Last edited by Tom_J_W; 06-11-2013 at 01:21 AM.

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

    Re: Seperating single cell addresses into multiple columns

    Hey Tom,

    First try the TRIM() function that will reduce all double spaces to single spaces. Then put up a sample of what you have. It may be a lot of grunt work, but let us look to make sure there aren't easier ways....

    To post a sample file, click on "Go Advanced" and then the Paper Clip Icon above the message area.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-21-2013
    Location
    melbourne, victoria
    MS-Off Ver
    2010
    Posts
    28

    Re: Seperating single cell addresses into multiple columns

    Example.xlsx

    Here you go, I just had to mess up the addresses a bit for security reasons

  4. #4
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Seperating single cell addresses into multiple columns

    write at B2
    =TRIM(MID(SUBSTITUTE(SUBSTITUTE($A1,"/"," ")," ",REPT(" ",LEN($A1))),(COLUMN(A1)-1)*LEN($A1)+1,LEN($A1)))

    copy to right and down

  5. #5
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Seperating single cell addresses into multiple columns

    sorry the first formula write at B1

  6. #6
    Registered User
    Join Date
    02-21-2013
    Location
    melbourne, victoria
    MS-Off Ver
    2010
    Posts
    28

    Re: Seperating single cell addresses into multiple columns

    Hi Ghozi,

    Thanks for your assistance but all it seems to be doing is splitting the cells from left to right, this means any cells with an extra seperation (say a U at the front) are pushed a column further to the right.

  7. #7
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Seperating single cell addresses into multiple columns

    change formula at B1 before with
    =MID(SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE($A1,"/"," "),"U",""))," ",REPT(" ",LEN($A1))),((COLUMN(A1)-1)*LEN($A1))+1,LEN($A1))

    drag right and down

  8. #8
    Registered User
    Join Date
    02-21-2013
    Location
    melbourne, victoria
    MS-Off Ver
    2010
    Posts
    28

    Re: Seperating single cell addresses into multiple columns

    Ah I see now, not sure how I misunderstood that to be honest.

    When I say bound to the right I don't mean to the right side of the cell, I mean when I use text to columns it pushes the new columns right, What O meed is to push the new columns left instead

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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