Excel Guides

## Determining a State from an Area Code in Excel

When you have an area code and want to determine the state it is in, there are a few steps you can take in Excel. You can use a VLOOKUP function, which will look up the area code in a list of area codes and return the state associated with it. You can also use a combination of the LEFT and RIGHT functions to extract the first three digits of the area code and then look up the state in a list of states. Finally, you can use the FIND function to find the position of the dash in the area code and then use the LEFT or RIGHT function to extract the state abbreviation.

The VLOOKUP function is the easiest way to determine a state from an area code. You can create a list of area codes and states in two columns, with the area codes in one column and the states in the other column. Then, you can use the VLOOKUP function to look up the area code in the first column and return the state in the second column. For example, if your list of area codes and states looks like this:

Area CodeState
201New Jersey
202District of Columbia
203Connecticut
204Manitoba
205Alabama
206Washington
207>Maine>/tr>> Then your VLOOKUP formula would be =VLOOKUP(A2,A1:B7,2,FALSE), where A2 is the cell containing the area code you want to look up, A1:B7 is the range of cells containing your list of area codes and states, 2 is the column number of the column containing the states (column B), and FALSE is specifying that you want an exact match. If you enter this formula into a cell next to a cell containing an area code, it will return the state associated with that area code.

### Excel

Get started with Causal today.
Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals.