+ Reply to Thread
Results 1 to 4 of 4

Postcode Separater

Hybrid View

  1. #1
    Registered User
    Join Date
    06-06-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    2

    Angry Postcode Separater

    Hello,

    I have hundreds of addresses with their postcodes in one cell. I need to split or extract the postcode from the main address and put it into the cell adjacent.

    E.G.

    I have this in column A:
    26, address 1, address 2, address 3, county, postcode

    But I need all the postcodes to be in the cells next to their original address in column B.

    All of the addresses are formatted differently; some have commas in between the county and postcode and some just have a space.

    How can I sort these!?

    I would really appreciate if anyone could help.

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Postcode Separater

    Could you post an example?
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Postcode Separater

    This will extract the postcode regardless of comma, space, or comma and space. In cell B1 and copy down:
    =TRIM(RIGHT(SUBSTITUTE(SUBSTITUTE(A1,",",REPT(" ",99))," ",REPT(" ",99)),99))
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    06-06-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Postcode Separater

    Thank you tigeravatar, I had to change the formula to:
    =TRIM(RIGHT(SUBSTITUTE(SUBSTITUTE(A1,",",REPT(" ",99))," ",REPT(" ",89)),99))

    This is brilliant, I am so grateful!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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