+ Reply to Thread
Results 1 to 9 of 9

Breaking up address with commas

  1. #1
    Forum Contributor
    Join Date
    10-13-2012
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    106

    Breaking up address with commas

    I am trying to print some address labels.

    I have an excel sheet and the address is all in one cell column Column D. What I am looking to do if possible, return in Column E the house Number. Then in F the street name. Column G the Town and finally the Post code in Columh H.

    Are is there another way to break the address and when it sees a comma to then return the next line underneath?

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,079

    Re: Breaking up address with commas

    You need to supply some test data
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Breaking up address with commas

    trumpetman can you supply a sample workbook?
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Forum Contributor
    Join Date
    10-13-2012
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Breaking up address with commas

    I have attach a quick one line example. I want to break the address up either so that the number comes back in e, then street in column f etc. Or if there is another way I am open to that as well.

    Thanks
    Attached Files Attached Files

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Breaking up address with commas

    I have tried to put in a macro that may do what you want, button included. Let me know if this works for you.
    Attached Files Attached Files

  6. #6
    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: Breaking up address with commas

    use this formula in E2 and pull it to the right until you see blanks

    =TRIM(MID(SUBSTITUTE(","&$D$2,",",REPT(" ",50)),50*COLUMNS($A:A),50))

    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    2
    Mr Ian Test 1, Letsby Ave, Jail, XX1 1YZ 1 Letsby Ave Jail XX1 1YZ
    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

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Breaking up address with commas

    Nice AlKey, can't say I follow the formula quite to the end, but good solution. (no idea what REPT is)

  8. #8
    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: Breaking up address with commas

    Quote Originally Posted by Arkadi View Post
    Nice AlKey, can't say I follow the formula quite to the end, but good solution. (no idea what REPT is)
    The REPT function withing SUBSTITUTE is used to replace a character with a bunch of spaces.

  9. #9
    Forum Contributor
    Join Date
    10-13-2012
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Breaking up address with commas

    Thanks guys that's great, thanks.

+ 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] Run time error '1004': The address of this site is not valid. Check the address the addre
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-12-2014, 06:59 AM
  2. Replies: 5
    Last Post: 01-17-2014, 05:56 PM
  3. [SOLVED] Breaking up address into different columns
    By profitdr123 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-10-2013, 02:32 PM
  4. Removing address info when there are no commas
    By jpdren in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-13-2013, 01:52 PM
  5. Replies: 1
    Last Post: 02-19-2010, 11:21 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