+ Reply to Thread
Results 1 to 7 of 7

Determine state via postcode (zip code)

  1. #1
    Registered User
    Join Date
    01-27-2012
    Location
    Queensland
    MS-Off Ver
    Excel 2010
    Posts
    5

    Determine state via postcode (zip code)

    Hi,

    I need to add a state in a separate column in a sheet I am dealing with at the moment and need a formula that will add a state bases on the post code (zip code for those in the US

    The postcodes are as follows:
    Australian Capital Territory (ACT) 2600 to 2618 and 29##
    New South Wales (NSW) 2###
    Northern Territory (NT) 08## and 09##
    Queensland (QLD) 4###
    South Australia (SA) 5###
    Tasmania (TAS) 7###
    Victoria (VIC) 3###
    Western Australia (WA) 6###

    I have added a speadsheet which shows what I am working with.loc list.xlsx

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Determine state via postcode (zip code)

    Hi slinkyfox,

    First, you codes in D are in text format which can create issues in calculation.
    Then, I would suggest you to have a table of postcodes on right side of data and then you can do lookups from there.

    let me know if this sounds interesting and if yes, get back with postcodes table and mention some results expected in column E. thanks.

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    01-27-2012
    Location
    Queensland
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Determine state via postcode (zip code)

    Hi,

    I am not 100% sure of you answer so I will try and give the best information I can.

    The postcodes in D need to be in text format in the form of numbers. As you can see from the table above I only need to determine what the state is from the first 1-2 numbers. For example, postcodes for the state Queensland always begin in 4 and so on and so forth for the other states. There are some exceptions for states act and nt.

    Thanks

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Determine state via postcode (zip code)

    For example, postcodes for the state Queensland always begin in 4
    and now one will go to column D "Post Code" and will search any post code beginning with 4 and will write State "Queensland (QLD)" as a result in column E.. correct ?

    and now he will come again here (in excelforum thread) to proceed with other states.. and hence I suggested to move this table in Excel workbook.. hope this becomes clear now.

    Also, if your text numbers (or post codes) can become number then that will help in searching / matching and hence I pointed that your codes are in text format.

    Regards,
    DILIPandey
    <click on below * if this helps>

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Determine state via postcode (zip code)

    I'm not to clear as to where you are going with this.

    Your data might be best sorted by *Country Code"

    I have generated a list of "Unique Codes", Column K, this is used for a Dynamic Name "Unique_Codes", and is in turn used for the Data Validation List in G1.
    Select from the drop-down to see the changes in Columns G:I

    We can drill further down once you clarify your criteria, then use the new list as a lookup for your codes.

    Your Data has many duplicates, these might best be deleted.

    This workbook might not provide the answer you are asking for, but it should go some way towards a final solution.
    Attached Files Attached Files
    Last edited by Marcol; 01-26-2013 at 06:49 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  6. #6
    Registered User
    Join Date
    01-27-2012
    Location
    Queensland
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Determine state via postcode (zip code)

    Sorry I may have uploaded the wrong sheet.

    Does this make more sense now?
    Attached Files Attached Files

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Determine state via postcode (zip code)

    Okay see if this is more like it.

    Enter the first digit of the code, as a number, that you want to search for in Gell G1
    This can be easily changed to work for the first few digits entered.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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