To identify values in one list that are missing in another list, you can use a simple formula based on the COUNTIF function with the IF function. In the example shown, the formula in G6 is:


where "list" is the named range B6:B11.

Generic formula



The COUNTIF function counts cells that meet criteria, returning the number of occurrences found. If no cells meet criteria, COUNTIF returns zero. You can use behavior directly inside an IF statement to mark values that have a zero count (i.e. values that are missing). In the example shown, the formula in G6 is:


where "list" is a named range that corresponds to the range B6:B11.

The IF function requires a logical test to return TRUE or FALSE. In this case, the COUNTIF function performs the logical test. If the value is found in list, COUNTIF returns a number directly to the IF function. This result could be any number... 1, 2, 3, etc.

The IF function will evaluate any number as TRUE, causing IF to return "OK". If the value is not found in list, COUNTIF returns zero (0), which evaluates as FALSE, and IF returns "Missing".

Alternative with MATCH

You can also test for missing values using the MATCH function. MATCH finds the position of an item in a list and will return the #N/A error when a value is not found. You can use this behavior to build a formula that returns "Missing" or "OK" by testing the result of MATCH with the ISNA function. ISNA returns TRUE only when it receives the #N/A error.

To use MATCH as shown in the example above, the formula is:


Using the MATCH function to find missing values in a column

Note that MATCH must be configured for exact match. To do this, make sure the third argument is zero or FALSE.

Alternative with VLOOKUP

Since VLOOKUP also returns an #N/A error when a value isn't round, you can build a formula with VLOOKUP that works the same as the MATCH option. As with MATCH, you must configure VLOOKUP to use exact match, then test the result with ISNA. Also note that we only give VLOOKUP a single column (column B) for the table array.

Using the VLOOKUP function to find missing values in a column

Dave Bruns Profile Picture

AuthorMicrosoft Most Valuable Professional Award

Dave Bruns

Hi - I'm Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.