Thanks:  0
Likes:  0

# Thread: Area code lookup table that returns State

1. 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. 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. 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. 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.

## User Tag List

#### Posting Permissions

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