Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Excel Line Chart
  • How to conditionally sum numeric data in an Excel table using SUMIFS
  • Example of COUNTIFS with variable table column in Excel
  • How to count table columns in Excel
  • Managing Conditional Formatting Rules in Excel

References

  • Offset in Excel
  • Extract data with helper column in Excel
  • How to get address of last cell in range in Excel
  • VLOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • Get nth match with INDEX / MATCH in Excel

Data Validations

  • Prevent invalid data entering in specific cells
  • Excel Data validation require unique number
  • Excel Data validation no punctuation
  • Excel Data validation unique values only
  • Excel Data validation exists in list

Highlight missing values in Excel

by

This tutorial shows how to Highlight missing values in Excel using the example below;

Formula

=COUNTIF(list,A1)=0

Explanation

To compare lists and highlight values that exist in one but not the other,  you can apply conditional formatting with a formula based on the COUNTIF function. For example, to highlight values A1:A10 that don’t exist C1:C10, select A1:A10 and create a conditional formatting rule based on this formula:

=COUNTIF($C$1:$C$10,A1)=0

Note: with conditional formatting, it’s important to enter the formula relative to the “active cell” in the selection, which is assumed to be A1 in this case.

Worked Example:   Data validation must not exist in list

How this formula works

This formula is evaluated for each of the 10 cells in A1:D10. A1 will change to the address of the cell being evaluated, while C1:C10 is entered as an absolute address, so it won’t change at all.

The key to this formula is the =0 at the end, which “flips” the logic of the formula. For each value in A1:A10,  COUNTIF returns the number of times the value appears in C1:C10. As long as the value appears at least once in C1:C10, COUNTIF will return a non-zero number and the formula will return FALSE.

Worked Example:   Count cells that do not contain in Excel

But when a value is not found in C1:C10, the COUNTIF returns zero and, since 0 = 0, the formula will return TRUE and the conditional formatting will be applied.

Named ranges for simple syntax

If you name the list you are searching (C1:C10 in this case) with a named range, the formula is simpler to read and understand:

=COUNTIF(list,A1)=0

This works because named ranges are automatically absolute.

Worked Example:   Highlight values greater than in Excel

Case-sensitive version

If you need a case sensitive count, you can use a formula like this:

=SUMPRODUCT((--EXACT(A1,list)))=0

The EXACT function performs a case-sensitive evaluation and SUMPRODUCT tallies the result. As with the COUNTIF, this formula will return when the result is zero. Because the test is case-sensitive, “apple” will show as missing even if “Apple” or “APPLE” appears in the second list. See this page for a more detailed explanation.

Post navigation

Previous Post:

VLOOKUP without #N/A error in Excel

Next Post:

How to Create Gantt Chart in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • How to use Excel NOT Function
  • How to return blank in place of #DIV/0! error in Excel
  • Nested IF function example in Excel
  • Return blank if in Excel
  • IFS function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • ISOWEEKNUM function: Description, Usage, Syntax, Examples and Explanation
  • NETWORKDAYS.INTL function: Description, Usage, Syntax, Examples and Explanation
  • Get days, months, and years between dates in Excel
  • TODAY function: Description, Usage, Syntax, Examples and Explanation
  • Calculate expiration date in Excel

Grouping

  • Calculate conditional mode with criteria in Excel
  • Running count group by n size in Excel
  • Group times into 3 hour buckets in Excel
  • Group times into unequal buckets in Excel
  • Categorize text with keywords in Excel

General

  • How to password protect excel sheet?
  • Customize Ribbon In Excel
  • AutoFit Column Width, AutoFit Row Height in Excel
  • How to count total columns in range in Excel
  • How to Insert Cells, Row and Rows in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning