+ Reply to Thread
Results 1 to 3 of 3

Lookup postcode zone from postcode

Hybrid View

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    10

    Lookup postcode zone from postcode

    Hi all.

    I am sure this has been asked before, but i haven't been able to find the answer that I am looking for, so hopefully someone has the solution to my problem.

    I wish to be able to enter a postcode and get back what Zone the postcode belongs too.

    In my excel i have 2 sheets, Data & Zone.

    In the Zone sheet I created the Post code to / from (Column B & C) and what zone (Column A) it belongs to.
    I named the 2 rages.
    Column A = DK_Zone and Column B & C = DK


    In the data sheet i have Country and Zone (Cell B1 & C1) Postcode (Postnr) (Cell B2) and then in Cell B3 I need to return the zone with a lookup based on the value in B2 (Postcode)
    My problem it that Lookup also returs if the postcode is not in any From/to Range in a row?

    i.e Postcode 8461 is not in any range, but it return zone "3"
    I think the reason is that it looks at the postcode range as from smallest to Largest, but that is not what i am looking for.
    I need it to look at every row "seperatly" and if the postcode is not in any from/to range in a row, it will retur a text "postcode does not exist" or something like that.

    Hop someone is able to help me in the right direction.

    Thanks

    Soren
    Attached Files Attached Files

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Lookup postcode zone from postcode

    Try this.......
    =IFERROR(INDEX(DK_zone,IF(OR(AND(B2>=Zone!B3,B2<=Zone!C3),AND(B2>=Zone!B4,B2<=Zone!C4),AND(B2>=Zone!B5,B2<=Zone!C5),AND(B2>=Zone!B6,B2<=Zone!C6),AND(B2>=Zone!B7,B2<=Zone!C7),AND(B2>=Zone!B8,B2<=Zone!C8),AND(B2>=Zone!B9,B2<=Zone!C9),AND(B2>=Zone!B10,B2<=Zone!C10),AND(B2>=Zone!B11,B2<=Zone!C11),AND(B2>=Zone!B12,B2<=Zone!C12),AND(B2>=Zone!B13,B2<=Zone!C13),AND(B2>=Zone!B14,B2<=Zone!C14),AND(B2>=Zone!B15,B2<=Zone!C15)),MATCH(B2,Zone!B3:B15,1)," ")),"Code Not Found")
    Please find the attached sheet.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Lookup postcode zone from postcode

    =IF(INDEX(Zone!$C$3:$C$15,MATCH(B2,Zone!$B$3:$B$15))<B2,"code not found",INDEX(Zone!$A$3:$A$15,MATCH(B2,Zone!$B$3:$B$15)))

+ 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] Help needed trimming full postcode address to postcode sector.
    By Mikey7346 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 08-10-2012, 05:11 PM
  2. Postcode If
    By NatNat in forum Excel General
    Replies: 24
    Last Post: 05-07-2009, 05:39 AM
  3. Postcode Help
    By mdoconnor in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-06-2007, 02:03 PM
  4. Postcode lookup with a twist.
    By Mad101daN in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-01-2007, 11:47 AM
  5. [SOLVED] postcode
    By flow23 in forum Excel General
    Replies: 2
    Last Post: 01-18-2006, 12:40 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