+ Reply to Thread
Results 1 to 15 of 15

Matching two lists of postcodes

  1. #1
    Registered User
    Join Date
    07-25-2023
    Location
    England
    MS-Off Ver
    office 365
    Posts
    6

    Matching two lists of postcodes

    Hi,

    I have a list of postcodes that relate to actual addresses (list 1) and another list of postcodes that are broken down by which areas of the city they belong to (list 2)

    I would like to be able to use a function to match/show which areas of the city postcodes from list 1 are in by comparing against list 2.

    Can anyone help me with this?

    I have attached a small example to show the type of data I have.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Matching two lists of postcodes

    In C5:

    =COUNTIF(Table1[Town Centre],TRIM(B5))

    This will count the number of instances that the value in B5, for example, was found in the "Town Centre" column.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,188

    Re: Matching two lists of postcodes

    Try this:

    =NOT(ISNA(MATCH(TRIM([@Addresses]),Table1[Town Centre],0)))

    I have had to use TRIM to clear the trailing spaces in the first list.
    Attached Files Attached Files
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Matching two lists of postcodes

    I fear your example is only part of the picture, your question says areas (plural)

    If your list for each area of the city is a postcode in one column and a area in the next column, it will be much easier than columns headed with the area with the postcodes then below. Does the sample replicate reality

  5. #5
    Registered User
    Join Date
    07-25-2023
    Location
    England
    MS-Off Ver
    office 365
    Posts
    6

    Re: Matching two lists of postcodes

    Yes you are right, I think I have simplified the task somewhat by mistake.

    I'm now realising that what I would like is for each residential postcode to be referenced against my table of area postcodes, where each column represents a different area in the city and the rows are the postcodes that belong in that area. Then once the postcode is matched the value returned would be which area of the city it belongs to.


    I hope that makes sense

    I have uploaded another example to show what I mean. How can I get the 'location' to populate with column headers in the postcode directory?

    Thanks.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-25-2023
    Location
    England
    MS-Off Ver
    office 365
    Posts
    6

    Re: Matching two lists of postcodes

    Hi Ali,

    Thanks for your response, its helpful though I think I have simplified what I am asking by mistake. Please see my post above to see better example

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,188

    Re: Matching two lists of postcodes

    Please manually fill in your expected results in the results table to show what we are aiming for.

  8. #8
    Registered User
    Join Date
    07-25-2023
    Location
    England
    MS-Off Ver
    office 365
    Posts
    6

    Re: Matching two lists of postcodes

    This would be the end result I am hoping for
    Attached Files Attached Files
    Last edited by AliGW; 07-25-2023 at 10:01 AM. Reason: Please do NOT quote unnecessarily!

  9. #9
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,930

    Re: Matching two lists of postcodes

    Try this in E2.

    Please Login or Register  to view this content.
    copied down.
    Attached Files Attached Files

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,188

    Re: Matching two lists of postcodes

    Try this:

    =LET(i,INDEX($I$1:$L$1,SUMPRODUCT(($I$2:$L$7=D2)*(COLUMN($I$2:$L$7)-8))),IF(COUNTA(i)>1,"-",i))
    Attached Files Attached Files
    Last edited by AliGW; 07-25-2023 at 10:13 AM. Reason: Workbook added.

  11. #11
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Matching two lists of postcodes

    Another option, in E2:
    =IFERROR(INDEX($1:$1,AGGREGATE(15,6,COLUMN($I$2:$L$7)/($I$2:$L$7=D2),1)),"-")

  12. #12
    Registered User
    Join Date
    07-25-2023
    Location
    England
    MS-Off Ver
    office 365
    Posts
    6

    Re: Matching two lists of postcodes

    Thanks so much for the help guys! I have managed to take the formula and copy to my data set. Amazed at how quick all the responses were and how useless at Excel I am

    I know where to come when I inevitably hit another snag

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,188

    Re: Matching two lists of postcodes

    Which did you go with, out of interest, as you had three different ones.

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  14. #14
    Registered User
    Join Date
    07-25-2023
    Location
    England
    MS-Off Ver
    office 365
    Posts
    6

    Re: Matching two lists of postcodes

    I went with your solution in the end as you seem quite responsive if I were to have any further issues.

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,188

    Re: Matching two lists of postcodes

    LOL!!! Trying to curry favour, eh?

    We are a very helpful bunch - all of us - so you will never be without assistance.

    Always happy to help.

+ 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. Index matching on postcodes - but only a certain part of a postcode
    By blackrosepetals9169 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-20-2018, 09:40 AM
  2. [SOLVED] Matching of Lists
    By y0shi in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 04-16-2015, 06:31 AM
  3. Matching between two lists
    By Climaxgp in forum Excel General
    Replies: 3
    Last Post: 02-25-2010, 09:44 AM
  4. Matching two lists?
    By NPgs1uk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-02-2007, 06:54 AM
  5. Matching 2 lists
    By pberdann in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-10-2006, 12:20 PM
  6. Matching two lists.
    By Jwhite in forum Excel General
    Replies: 1
    Last Post: 03-16-2006, 07:20 PM
  7. matching lists
    By dakotasteve in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-04-2005, 04:56 PM

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