Closed Thread
Results 1 to 10 of 10

VBA for UK Postcodes

  1. #1
    Registered User
    Join Date
    08-05-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    27

    VBA for UK Postcodes

    Hi,

    I have a huge list of data that I need to split into separate postcode areas.

    For example...

    Phone Number - First Name - Last Name - Address - Postcode

    I want to split each postcode area into a different file. BS1 BS2 BS11 BS12 and so on. However, some of the postcodes are in different formats so one might be BS1 1AA and another could be B1 1AA. When I select the postcodes to move to another sheet the other data on the same row has to move as well to stay relevant.

    Is there any easier way for me to do this other than manually selecting each area then copy and pasting?

    Example Data - I want each of these to go into its own spreadsheet, BS15, BS4, BS19. But there may be 3000 rows of data in BS15 for example.

    Phone First Name Last Name Add1 Add2 Add3 Postcode
    1234567891 J Smith 100 Scott Street Bristol BS15 4RT
    2345678910 S Thomson 114 Stable Drive Bristol BS4 9QV
    3456789101 M Jackson 17 Maple Avenue Bristol BS19 5HU



    Thanks.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: VBA for UK Postcodes

    Could you please continue in the original thread?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-05-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    27

    Re: VBA for UK Postcodes

    I thought this forum would be more appropriate to my question and this was also suggested by another poster on the other thread.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: VBA for UK Postcodes

    I think the suggestion was to add VBA to the thread title, not create a duplicate post albeit in a different section of the site.

    Anyways, any chance you could upload a sample workbook?

    Click on GO ADVANCED, scroll down and click Manage Attachments.

  5. #5
    Registered User
    Join Date
    08-05-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    27

    Re: VBA for UK Postcodes

    I have attached a pretty standard data set that i would be working with, albeit on a much larger scale.
    Attached Files Attached Files

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: VBA for UK Postcodes

    Quote Originally Posted by hannsg View Post
    I thought this forum would be more appropriate to my question and this was also suggested by another poster on the other thread.
    No, this is NOT what I suggested!
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    08-05-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    27

    Post Re: VBA for UK Postcodes

    Apologies I misread what you wrote.

    Well we are all here now anyway

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: VBA for UK Postcodes

    Quote Originally Posted by hannsg View Post
    Apologies I misread what you wrote.

    Well we are all here now anyway
    Perhaps you should go back and close the other thread as solved with a link to this one?

    If you don't, a moderator might slam you for creating duplicate threads.

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: VBA for UK Postcodes

    There have been three posts in the other thread this evening - stop wasting people's time by creating duplicate threads.

    Pete

  10. #10
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: VBA for UK Postcodes

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA for UK Postcodes
    By hannsg in forum Excel General
    Replies: 35
    Last Post: 09-05-2016, 01:37 AM
  2. [SOLVED] Vlookup Postcodes
    By Tafferel in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-04-2012, 06:50 AM
  3. Distance between UK postcodes
    By peterpcu in forum Excel General
    Replies: 13
    Last Post: 12-31-2011, 12:11 PM
  4. finding postcodes
    By SwanyP in forum Excel General
    Replies: 6
    Last Post: 02-28-2011, 01:21 PM
  5. Help with Splitting Postcodes
    By jo1234 in forum Excel General
    Replies: 1
    Last Post: 07-16-2008, 09:46 AM
  6. Standardizing Postcodes
    By mikeyfear in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-15-2008, 08:56 AM
  7. Postcodes
    By PH NEWS in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-05-2006, 05:15 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