+ Reply to Thread
Results 1 to 4 of 4

Grouping UK postcodes into the countries' regions

  1. #1
    Registered User
    Join Date
    04-26-2021
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    2

    Question Grouping UK postcodes into the countries' regions

    Greetings all,

    I'm currently working on a task where I have thousands of UK postcodes and I'd like to specify a region for each (South East, North West, Wales, etc.). I have so far assumed this can be done as the letters in the first section of each postcode give away the area within the country.

    As an example, I've got a postcodes list (left column below) and have been able to extract the letters from each using the following: "=LEFT(D3,2---(ISNUMBER(VALUE(MID(D3,2,1)))))". This works perfectly and gives me the column below to the right:

    GL12 6PQ............................GL
    LE4 2DQ..............................LE
    WA6 1LY.............................WA
    BB2 2FP...............................BB
    NN12 9QS............................NN
    B74 0LB...............................B
    IP23 3MY.............................IP
    B2 3BD................................B
    SR1 9VE..............................SR
    B70 1DT..............................B

    However, I would now like to associate these starting letters with the different regions in Great Britain. As follows:

    Postcodes starting with (UB, TW, KT, WD, HA, CR, SM, SW, BR, SE, DA, RM, IG, EN, N, NW, W, WC, EC, E).......London
    Postcodes starting with (CT, TN, BN, ME, RH, GU, PO, SO, RG, SL, HP, OX, MK, LU, AL, SG, CM, SS)..................South East of England
    (GL, SN, BS, BA, SP, BH, DT, TA, EX, PL, TQ, TR)........................................................South West of England
    (CO, CB, IP, NR, PE, LE, DE, NG, LN, S, DN)................................................................East Midlands
    (NN, CV, B, WR, HR, WS, DY, WV, TF, ST)..................................................................Midlands

    etc. etc. I'm happy to create a new column in my spreadsheet, a new worksheet for this, or do it all in a single column (letter extraction & sorting of area in a single column if possible). Any help will be much appreciated as this table could make my life a lot easier. Many thanks in advance,

    J.
    Last edited by zsp92; 04-27-2021 at 12:27 PM.

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

    Re: Grouping UK postcodes into the countries' regions

    If you list the starting letters of the postcode in one column and the corresponding Region in the next column, then you could use a VLOOKUP formula to return the appropriate Region from the postcode.

    Hope this helps.

    Pete

  3. #3
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,767

    Re: Grouping UK postcodes into the countries' regions

    Create table like:

    A
    B
    1
    code location
    2
    UB London
    3
    TW London
    4
    KT London
    5
    GL South West of England
    6
    SN South West of England
    7
    BS South West of England


    then use:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    where C1 is results ofyour double letter starting code.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  4. #4
    Registered User
    Join Date
    04-26-2021
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    2

    Re: Grouping UK postcodes into the countries' regions

    Thank you both, it worked a treat. Just had to add the $ before each value for the VLOOKUP table.

+ 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] Grouping postcodes into areas
    By Lynchos in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-19-2019, 05:37 AM
  2. Map with different regions
    By Shayro in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-31-2018, 06:22 PM
  3. grouping postcodes
    By toddp2 in forum Excel General
    Replies: 5
    Last Post: 09-01-2016, 05:34 PM
  4. [SOLVED] Formula to put differnt contries for their specific regions, ATTCD countries with region
    By raysrains in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-28-2014, 09:42 AM
  5. [SOLVED] Creating regions
    By aaaaaaiden in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-05-2014, 10:39 AM
  6. Replies: 1
    Last Post: 12-15-2012, 02:39 PM
  7. geographical regions
    By tbcwarrior in forum Excel General
    Replies: 1
    Last Post: 06-15-2007, 12:30 PM

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