New Tool Radar

AI for Data & Spreadsheets

How to Find Missing Values in Excel by Comparing COUNT With COUNTA

Find missing values in a column in Excel by comparing COUNT with COUNTA.

Schematic with three steps: Count numbers, non-empty cells and rows; Work out what each gap means; Find the empty cells and fill them.

COUNT counts only numbers and COUNTA counts every non-empty cell, so the gap between them tells you how many cells hold text, and the gap between COUNTA and the row count tells you how many cells are empty. An AI-drafted sheet can hide missing values behind a total that still looks right. Run both counts on each column before trusting the sheet.

What you need

  • Excel with the table to check
  • The number of data rows the table should have
  • A note of which columns must hold numbers and which hold text

Step 1: Count numbers, non-empty cells and rows

In spare cells, enter =COUNT for the column to count numbers, =COUNTA to count non-empty cells, and =ROWS for the data range. Write all three numbers down.

Step 2: Work out what each gap means

COUNTA minus COUNT is the number of text values in a numeric column; ROWS minus COUNTA is the number of empty cells. Decide from the source which gap matters for this column.

Step 3: Find the empty cells and fill them from the source

Use Go To Special, Blanks, to select the empty cells in the column, then fill each one from the source or mark it as not provided. Re-run the counts until the numbers match what the column should hold.

Worked example: synthetic 30-row amount column

The table below is a synthetic example. It shows the expected result of a COUNT and COUNTA check; no workbook was opened.

Count Value Meaning
ROWS in the data range 30 Rows expected
COUNTA, non-empty cells 27 3 cells empty
COUNT, numbers only 25 2 cells hold text
Empty cells to fill 3 Fill from source
Text values to convert 2 Convert to numbers

Expected result (UNTESTED). of 30 rows, 3 cells are empty and 2 hold text, so only 25 numbers are counted. Fill the 3 blanks from the source and convert the 2 text values before trusting the total. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • COUNTA counts a formula returning empty text as non-empty, so it can report no blanks where blanks exist.
  • COUNT ignores dates stored as text, so a date column can show a count of zero and still hold dates.
  • A header row inside the counted range inflates COUNTA by one; exclude headers from the range.
  • COUNT and COUNTA say nothing about whether the values are right, only whether they are present.

Sources

See all