Area code lookup table that returns State

MichaelM

New Member
Joined
Apr 13, 2002
Messages
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)?
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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.
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,559
Messages
6,114,302
Members
448,564
Latest member
ED38

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top