WorkbookLogic
FormulaFreeLookupintermediateCOUNTIFIFMATCHISNUMBERIFERRORCOUNTASUMPRODUCTAND

Find Missing Values Between Two Lists

By WorkbookLogic

Compare a review list with an authoritative list, label every identifier as present or missing, and reconcile COUNTIF results to an independent exact MATCH test.

ExcelLast reviewed Sep 11, 2026
find-missing-values-v1.0.0.xlsxFree
Find Missing Values, Formula Review
Compare presence checks built with COUNTIF and exact MATCH, including duplicate and missing cases.
Master listFunction review, presence is not the same as uniqueness
InvoicePresent valueINV-1003Missing valueINV-1014
INV-1001
INV-1002StepFormula syntaxResultMeaning
INV-1003COUNTIF count=COUNTIF($A$12:$A$18,$G$11)2Duplicate present
INV-1003IF + COUNTIF=IF(COUNTIF($A$12:$A$18,$G$11),"OK","Missing")OKPresent
INV-1004Exact MATCH=MATCH($G$11,$A$12:$A$18,0)3First position
INV-1005ISNUMBER + MATCH=IF(ISNUMBER(MATCH($G$11,$A$12:$A$18,0)),"OK","Missing")OKPresent
INV-1006Missing status=IF(COUNTIF($A$12:$A$18,$K$11),"OK","Missing")MissingAbsent
Reliability checks
COUNTIF and MATCH agree that INV-1003 is presentOK
COUNTIF exposes that INV-1003 occurs twiceOK
Missing example returns MissingOK

Overview

Label each identifier in a review list as OK when it exists in an authoritative master list or Missing when it does not. The workbook also exposes occurrence counts and reconciles the status to an independent exact MATCH calculation.

When to use it

Use it to reconcile invoice IDs, account mappings, employee numbers, product codes, schedule links, or interface records. It fits exact identifier checks where each reviewed value needs a visible row-level status and exceptions require action.

When not to use it

Use XLOOKUP when the result should return a related field as well as detect absence. Use FILTER when only a separate spill list of missing values is needed. Power Query or a database join is preferable for large recurring reconciliations with source transformation requirements.

Problem

Visual comparison is unreliable as lists grow, and a successful presence test can conceal duplicate keys in the master data. The calculation must distinguish absence from presence while keeping uniqueness as a separate control rather than treating any positive count as proof of a clean master list.

Source data

The synthetic master list in Combined Example!A12:A23 contains the unique invoices INV-1001 through INV-1012. The review list in C12:C18 is:

Invoice to check

Master count

Expected status

INV-1002

1

OK

INV-1005

1

OK

INV-1014

0

Missing

INV-1007

1

OK

INV-1010

1

OK

INV-1020

0

Missing

INV-1012

1

OK

Identifiers are text and comparisons are exact but not case-sensitive. Leading spaces, trailing spaces, or inconsistent text/number storage can prevent an intended match.

Calculations

  1. Count each review identifier in the bounded master range.
  2. Interpret zero as absent and any positive count as present.
  3. Convert the count to Missing or OK with IF.
  4. Run an exact MATCH for the same identifier.
  5. Convert a numeric position into the second status and compare both methods.
  6. Check master-key uniqueness separately.

Outputs

Five of the seven reviewed invoices are found and two are missing: INV-1014 and INV-1020. Every row receives one status. The summary reports 5 found, 2 missing, 7 checked, and OK when COUNTIF and MATCH agree.

Formula map

COUNTIF status

=IF(COUNTIF($A$12:$A$23,C12),"OK","Missing")

The master range is absolute and the reviewed identifier moves by row.

Exact MATCH reconciliation

=IF(ISNUMBER(MATCH(C12,$A$12:$A$23,0)),"OK","Missing")

Match type 0 requires an exact identifier. Copy both formulas down the review list.

Model checks

The workbook confirms that COUNTIF and MATCH agree row by row, found plus missing equals the seven reviewed values, and the master list is unique. Each passing control returns OK.

Edge cases

  • Duplicate master values produce a count above one but still return OK; use the uniqueness check to expose them.
  • A missing value returns count zero and #N/A from raw MATCH before the status wrapper.
  • Blank review cells can match blanks if the master range includes unused cells.
  • Numeric IDs and identical-looking text IDs may not match.
  • Approximate MATCH is unsuitable for unsorted identifiers; use match type zero.

Common errors

  • Treating presence as uniqueness: a positive count can include duplicates. Retain a distinct master-data check.
  • Using oversized blank ranges: blank values may appear to match. Bound the source or define blank behavior.
  • Hiding exceptions with blanks: missing items disappear from review. Return an explicit action label.
  • Ignoring whitespace or type differences: intended matches fail. Normalize identifiers first.

Example

INV-1014 appears zero times in A12:A23, so COUNTIF returns 0 and the status is Missing. Exact MATCH also finds no position. INV-1007 appears once, producing OK and MATCH position 7. Both methods therefore agree on these present and absent cases.

Example workbook

Replace the cream master list in Combined Example!A12:A23 or review list in C12:C18. Statuses, summary counts, and three checks update automatically. Formula Review also demonstrates a duplicate master value so presence and uniqueness can be compared directly.

Key takeaway

Use an exact presence test to identify missing values, but retain the occurrence count or a separate uniqueness control so duplicate master keys cannot pass unnoticed.