Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Area code lookup table that returns State

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Is there a freeware/shareware utility/worksheet, etc. that can lookup a column of area codes and return the corresponding state (state code is sufficient)?

  2. #2
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    83,586
    Post Thanks / Like
    Mentioned
    30 Post(s)
    Tagged
    6 Thread(s)

    Default

    On 2002-04-14 07:00, MichaelM wrote:
    Is there a freeware/shareware utility/worksheet, etc. that can lookup a column of area codes and return the corresponding state (state code is sufficient)?
    Have a look at the VLOOKUP worksheet function if you already have a table of area codes.

  3. #3
    Board Regular Brian from Maui's Avatar
    Join Date
    Feb 2002
    Posts
    8,450
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-14 07:00, MichaelM wrote:
    Is there a freeware/shareware utility/worksheet, etc. that can lookup a column of area codes and return the corresponding state (state code is sufficient)?
    You can build one using VLOOKUP

  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    London, UK
    Posts
    167
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Basically, all you need is a new worksheet in your workbook, with the list of all the states against the area code prefix for each state (the area code needs to be the left hand column, as it is the thing you will be looking up)...

    Then in a new column against the list you want to do the lookup on, put the following...


    =VLOOKUP(A2,StatesRef!A:B,2,FALSE)

    where:
    -this formula goes into cell B2
    -it is looking up the value in A2, in the first column of the specified reference list, and returning the value in the second column of that list.
    -specified reference list is on sheet named "StatesRef", in columns A & B.
    -FALSE just means "don't estimate a match", for exact matches only.


    ...note, eg for zip codes you would only compare the left two characters, so the above equation would become...

    =VLOOKUP(Left(A2,2),StatesRef!A:B,2,FALSE)


    play with it & see, good luck.


    <table style="background-color:#0e54be" cellspacing="1" cellpadding="2"><td style="background-color:#ceffff;font-family:arial;color:#072c63;font-size:8pt;"> DALEY :P </td></table>

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •