Two good ways to solve this problem in Excel are theCOUNTIF functionand theMATCH function.

Both approaches are explained below.

COUNTIF function

COUNTIFcounts cells in a range that meet a given condition (criteria).

Using the MATCH function to find missing values in a column

If no cells meet the criteria, COUNTIF returns zero.

The generic syntax for COUNTIF is:

To check for missing invoices, combine COUNTIF with theIF function.

The formula in G5 is:

Notice the COUNTIF formula appears inside the IF function as thelogical_testargument.

Using the MATCH function to find missing values in a column

Normally, the IF function requires a logical test to return TRUE or FALSE.

When the count is non-zero, The IF function returns “OK”.

Alternative with MATCH

Another approach is to use theMATCH function.

Using the MATCH function to find missing values in a column

MATCH locates the position of a value in a row, column, or table.

When MATCH finds the lookup value, it returns thepositionof that value in the array as anumber.

If MATCH doesn’t find the lookup value, it returns an #N/A error.

Using the MATCH function to find missing values in a column

When an invoice number is not found, MATCH returns #N/A.

The ISNUMBER function returns TRUE or FALSE, depending on the result from MATCH.

Choose based on personal preference.

Using the MATCH function to find missing values in a column

The COUNTIF function requires a range.

This might be important when usingdynamic array formulas.

To read more about this limitation,see this article.

Excel formula: Count missing values

More than one condition can be tested by nesting IF functions.

MATCH supports approximate and exact matching, andwildcards(* ?)

Excel formula: Highlight missing values

Excel formula: List missing values

Excel COUNTIF function

Excel IF function

Excel MATCH function

Excel ISNUMBER function

Article image

Article image

Article image

Using the MATCH function to find missing values in a column