+ Reply to Thread
Results 1 to 18 of 18

Extracting street name and house number from address list

  1. #1
    Registered User
    Join Date
    10-28-2010
    Location
    UK, Swansea
    MS-Off Ver
    Excel 2010
    Posts
    64

    Extracting street name and house number from address list

    Hi,
    I need to separate the house number and street name from a list of addresses.
    My address list contains about 5000 entries showing house number, and street name (sometimes Flat number) in various and inconsistent formats with the house number being both in front of the street name and behind the street name, sometimes separated with commas and othertimes not.
    I have inserted the different types/format of address into the attached worksheet and in column B have shown the addresses in their original formats. I would like to separate the address into number and street name as I have done manually in Columns C and D but would appreciate some assistance/ advice or preferably a formula that I can use.
    Many thanks
    Mikey
    Attached Files Attached Files

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Extracting street name and house number from address list

    Hello Mikey7346,

    Best would be to start all over again. Yes unfortunately, it is the only way. Set up a sheet with one Column for the House/Unit or Flat number ONLY, and in the adjacent Column The Street name, and maybe next to that the Town, and then the Suburb, if you would need that in future.

    To try and create a Code with a multitude of permutions, of which at the moment you only exhibit a few, would be next to impossible. Think about it.

    How would one Code to cater for double spaces or, "-", " -","- ", " - ", "_", " _", ",_ ", "/", " /", "/ ", " / ", etc., etc,? and these are only a very few examples.
    Last edited by Winon; 10-20-2012 at 11:58 AM.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    10-28-2010
    Location
    UK, Swansea
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Extracting street name and house number from address list

    Hi Winon,
    Thanks for responding. As an alternative it would help if I could get all the street names in order. To reduce the number of permutations, would you be able to help with a formula that would separate the number and comma (or two commas and no commas!) before the street name. I would then have a column with the street name and the adjacent column with the full addresse in the various formats as have shown in my modified sample attachment, where the three different types of address format with number before street name is shown.
    Thanks
    Mikey
    Attached Files Attached Files

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Extracting street name and house number from address list

    Hello Mikey7346,

    Sorry, as I have said in my previous post, it is impossible. Everything is too jumbled up for the system to distinguish between Text and Integers, let alone all sorts of separators.

    Highlight your Column with this mess, Select two adjacent Columns and via PasteSpecial, Paste Values. Decide what you want where and delete appropriately.

    Good Luck.

  5. #5
    Registered User
    Join Date
    10-28-2010
    Location
    UK, Swansea
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Extracting street name and house number from address list

    Hi Winon
    Looks like I have no alternative but to do it manually.
    Thanks and regards
    Mikey

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Extracting street name and house number from address list

    Hello Mikey7346,

    Yup, Sorry about that. Maybe in the meantime, there just might be some Guru out on the Forum somewhere, who might come up with some sort of Code or Formulae, to sort it out for you.

    If that happens, I would love to see how!

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Extracting street name and house number from address list

    Try the attached
    Attached Files Attached Files
    Last edited by jindon; 10-24-2012 at 10:47 PM.

  8. #8
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Extracting street name and house number from address list

    Try...

    D5;

    Please Login or Register  to view this content.
    C5;

    =TRIM(SUBSTITUTE(SUBSTITUTE(B5,D5,""),",","",1))

    Then copy C5:D5 & paste down.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Extracting street name and house number from address list

    @ jindon,

    That is very well done jindon!

  10. #10
    Registered User
    Join Date
    10-28-2010
    Location
    UK, Swansea
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Extracting street name and house number from address list

    Hi Haseeb
    Have been away and what a brilliant surprise to see your solution, you are an absolute genius and can't thank you enough, also
    Winon for your perseverence. Thanks again to you both.
    Best regards
    Mikey

  11. #11
    Registered User
    Join Date
    10-28-2010
    Location
    UK, Swansea
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Extracting street name and house number from address list

    Sorry forgot to mention you Jindon, only saw Haseebs post initially, thanks again to you both
    Rgds
    Mikey

  12. #12
    Registered User
    Join Date
    10-28-2010
    Location
    UK, Swansea
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Extracting street name and house number from address list

    Hi Jindon,
    Just to let you know I put my whole address range consisting of 1869 addresses in the column and it sorted 1863 out,
    I didnt worry too much about the other six but am so very grateful for your solution.
    Best regards
    Mikey

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Extracting street name and house number from address list

    No worries.

    If you have any situation that the code doesn't pick up the correct results, just post back with the data and the desired result...

  14. #14
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Extracting street name and house number from address list

    Hello Mikey7346,

    That shouldn't happen, unless the data contains characters which are not known to jindons' Code. Or is there no difference?

  15. #15
    Registered User
    Join Date
    10-28-2010
    Location
    UK, Swansea
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Extracting street name and house number from address list

    Hi Jindon
    As I said 99.8% of all my address formats are recognised by your macro, The ones that are not are included on the attached, Also I have one or two addresses that are a name and a street eg Seaview, Atlantic Av which I can manage manually. I am so happy with the results as they are but if you want to have a look at the addresses that are not picked up by your code they are on the attached.
    Thanks again
    Mikey
    Attached Files Attached Files

  16. #16
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Extracting street name and house number from address list

    Try change to
    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    10-28-2010
    Location
    UK, Swansea
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: Extracting street name and house number from address list

    Hi Jindon,
    Am not at all familiar with macros and dont really know what I have done and whether I have done it properly but pressed "click" and the three outstanding addresses separated correctly. I then input my whole address range and got a 100% separation. For your info (and Winton's if you read this) I have manually separated about 2800 addresses during the past week and in a second separated the remaining 1869. No more manual separation!!
    Thank you again
    Mikey

  18. #18
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Extracting street name and house number from address list

    Glad it worked and thanks 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)

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