How to VLOOKUP Zip Codes?

Whether for a school project or a work assignment, chances are you're going to need to use VLOOKUP at least once in your life. Let's say you have a long list of names, contact information, and addresses, including zip codes.

You need to pull the zip codes for a targeted subset of contacts on the list, but looking up each contact individually is time consuming. Fortunately, VLOOKUP can help you quickly pull zip codes for any sized list of contacts. Let's take a look how to VLOOKUP zip codes.

Start by organizing your data into two separate Excel lists. The first list should contain a list of zip codes, and the second one should contain the information you want to return based on the zip code, such as the city, state, or latitude and longitude coordinates.

Zip codes task

In this example, you have a list of contacts and need to quickly identify Anne's zip code from the contact sheet. For this example, we are using a short list for simplicity, but the same concepts can be used if the list is 10 rows long or 10,000 rows long.

Learning materials are available under this link.

vlookup zip codes table

1. First, we need to identify what we are looking for. In this example, we are using VLOOKUP to identify Anne's zip code.

2. In order to identify her zip code, we need to understand the VLOOKUP formula.

A VLOOKUP formula looks for a value in the leftmost column of a table, and then returns a value in the same row from a column you specify. It is broken up into four distinct parts (the value, the range you're looking in, the column that houses the information you want to pull into the cell, and whether or not you need an exact match of what the value is)

vlookup zip codes function

Vlookup zip code formula

3. To successfully pull in Anne's zip code, structure the formula as follows: =VLOOKUP(E2,A:B,2,FALSE)

  • E2 - points to Anne, meaning we are looking up Anne in our range
  • A:B - highlights the columns where we are locating the lookup value and the value we want to pull into the cell (the zip code)
  • 2 - identifies the column housing the information we want to populate in the cell. In this example, the zip code is found in the second column of our highlighted range
  • FALSE - means it should only pull information with an exact match (if there were no Anne, or the name was spelled differently, it would not pull a zip code into the cell).

vlookup zip codes formula

To make it easier to identify the information returned based on the zip code, you can use conditional formatting. Conditional formatting allows you to apply a fill color, font color, or other formatting to a cell or range of cells based on a condition.

There you have it! You can now successfully use VLOOKUP to quickly identify zip codes in a long list of data. VLOOKUP is a powerful formula that may seem intimidating at first, but with a little practice you'll find that you can use it in a wide range of scenarios.

There are a few things to keep in mind when using the VLOOKUP function to look up zip codes:

  • Make sure that the zip codes in the first worksheet are unique. If there are duplicate zip codes, the VLOOKUP formula may return the wrong information.
  • Make sure that the first worksheet is sorted in ascending order by the zip code column. This will ensure that the VLOOKUP formula returns the correct information.
  • Make sure that the zip codes in the first worksheet are formatted as text, not numbers. This will ensure that the VLOOKUP formula returns the correct information.
  • Make sure that the lookup value in the second worksheet is formatted as text, not numbers. This will ensure that the VLOOKUP formula returns the correct information.
  • Use the "Exact match" match type when looking up zip codes. The "Approximate match" match type may return incorrect information when looking up zip codes.
Further reading:
How to use Xlookup function in Excel