KutoolsforOffice — One Suite. Five Tools. Get More Done.February Sale: 20% Off

How to convert zip code to state in Excel?

AuthorKellyLast modified

In the United States, each state is associated with specific ranges of zip codes. When working with data in Excel, you may have a list of zip codes and need to identify which state each zip code belongs to. This is a common challenge for those dealing with sales data, delivery addresses, demographic analysis, or customer segmentation by region. Inaccurate mapping or manual lookup can be tedious and error-prone, particularly with large datasets. This guide introduces practical methods to efficiently convert zip codes to their corresponding US state names directly in Excel, ensuring data accuracy and saving significant time.


Convert zip codes to US state names with formula

To convert a zip code to its corresponding US state name in Excel, you can use a formula-based approach, which is ideal for standard use cases and small to medium-sized datasets. This method ensures you can quickly achieve accurate conversions if the data is well organized.

Start by setting up two essential data components in your workbook:

  • A source table that lists each state alongside the minimum and maximum zip codes assigned to it.
  • The column or range where you want to convert the zip codes to state names.

Here's how you can prepare your worksheet:

1. Create or obtain a reference table containing zip code ranges and corresponding state names, for example, by copying data from a trusted source like the webpage: http://www.structnet.com/instructions/zip_min_max_by_state.html. Paste this table into a new worksheet. Typically, this table includes columns such as State Name, State Abbreviation, Zip Min, and Zip Max.

When setting up your table, ensure there are no blank rows, that each zip code range is accurate, and that columns are correctly labeled to avoid formula errors. Common misalignments or range overlaps may result in incorrect results.

2. Next, select a blank cell where you wish to display the state name result (for example, cell I3), and enter the following formula:

=LOOKUP(2,1/($D$3:$D$75<=H3)/($E$3:$E$75>=H3),$B$3:$B$75)

convert zip code to state with formula

Note: In this formula:

  • $D$3:$D$75 refers to the Zip Min column in your zip code-state table.
  • $E$3:$E$75 refers to the Zip Max column in your reference table.
  • H3 is the cell containing the specific zip code to convert.
  • $B$3:$B$75 is the State Name column. If you want to return the state’s abbreviation instead of its full name, change this range to $C$3:$C$75 (the abbreviation column).

Make sure all range references match the positions of your actual data. Using incorrect ranges may cause lookup errors or return incorrect states.

After entering the formula, press Enter to get the corresponding state name. You can also copy the formula down to convert multiple zip codes in a column. To do this, select the cell with the formula, then drag the fill handle (the small square at the bottom right corner of the cell) down to fill adjacent cells where you want the results.

If you frequently work with zip code data or need to handle large datasets, remember that this formula approach might slow down if processing thousands of rows, as LOOKUP array formulas can be calculation-intensive. For quickest results in those cases, consider using alternative solutions, such as specialized add-ins or automation with VBA.

Troubleshooting tip: If the formula returns #N/A, double-check if the zip code exists within any of the specified ranges in your reference table. Ensure there are no data entry errors or missing zip code ranges in your source data.



Convert multiple zip codes to state names with an amazing tool

For users who need to convert large volumes of zip codes to state names quickly, or where formula errors need to be systematically avoided, using a specialized Excel add-in like Kutools for Excel can greatly simplify the process. This is especially valuable for organizations with recurring address processing or reporting needs.

Suppose you have already added a zip code-state reference table to your workbook. Now, let's say you want to match and convert all zip codes in the range G3:G11 to their corresponding state names, similar to the example below:
sample data

The LOOKUP between Two Values feature in Kutools for Excel allows you to process these conversions quickly and accurately, with less risk of formula errors. Advantages of this method include batch processing of multiple records, a user-friendly graphical interface, and built-in options to manage unmatched zip codes gracefully.

1. Go to the Kutools tab, navigate to Super LOOKUP and select LOOKUP between Two Values from the drop-down menu. This will launch the setup dialog.
click LOOKUP between Two Values feature of kutools

2. In the LOOKUP between Two Values dialog box, configure the fields as follows:

  • Lookup Values: Select the range of zip codes you want to convert (e.g., G3:G11).
  • Output Values: Choose the range where you wish the resulting state names to appear.
  • Replace #N/A error value with a specified value (optional): You may write a default value to display in case a zip code is not found in your table (such as "Not Found" or leave it blank).
  • Data range: Specify your entire zip code-to-state reference table, including all required columns.
  • The column containing max values: Point to the column with maximum zip codes ("Zip Max").
  • The column containing min values: Point to the column with minimum zip codes ("Zip Min").
  • Return Column: Select the state name column to return the desired values.

configure options in the LOOKUP between Two Values dialog

Take care to match your selection ranges with your actual data’s location in the worksheet. A mismatch could result in unexpected results or errors. Use the preview area, if available, to verify your mapping before applying changes.

3. Once configured, click the OK button to execute the conversion.

The matched state names will appear in your chosen output range, matching each zip code to its corresponding state as shown below:
the specified zip codes are converted to corresponding state names

Using this tool provides a visual and interactive approach that minimizes manual set-up and reduces the chances of formula mistakes. You can process hundreds or thousands of zip codes at once. If you encounter issues where some results display as #N/A, check whether your data range covers all zip code intervals required or if there are format inconsistencies, such as spaces or wrong data types.

This approach is ideally suited when speed, efficiency, or error prevention is a priority—such as in customer service, marketing analytics, or any recurring report involving geographic mapping.


Related articles:

Best Office Productivity Tools

🤖Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |  Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |  Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

ExcelWordOutlookTabsPowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in