![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 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 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
|
Quote:
|
|
|
|
|
|
|
#3 | |
|
Board Regular
Join Date: Feb 2002
Posts: 7,743
|
Quote:
|
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Location: London, UK
Posts: 167
|
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> |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|