To highlight unmatched cells in Excel, you compare each value with a second list and colour the ones that are missing from it. A typical case: your sales sheet contains products that are not in the product master yet, and you want to spot those new items before they cause wrong reports. In this tutorial you build that check with conditional formatting in three ways, using VLOOKUP, MATCH or COUNTIF, exactly as PK shows in his video and practice workbook. No helper columns stay behind; the highlighting updates by itself whenever either list changes.

⬇️ Download the Practice Workbook
Excel workbook (.xlsx, 11 KB) · 2 sheets: Sales and Product Master · no macros
Watch the Video Tutorial
PK tests each formula in a spare column first, then uses it in a conditional formatting rule to highlight the new products, and finishes with a filter by colour to list them.
What You Will Build
- A conditional formatting rule that colours every product in the Sales sheet that does not exist in the Product Master.
- Three interchangeable formulas: ISERROR with VLOOKUP, ISERROR with MATCH, and COUNTIF equal to 0.
- A quick TRUE/FALSE test so you can check the logic before you create the rule.
- A filtered list of the unmatched products using Filter by Color.
How the Practice File Is Laid Out
- Sales sheet: Product Name in A1, Sale Date in B1 and Unit Sold in C1, with 18 rows of data in A2:C19 (Product-1 to Product-18).
- Product Master sheet: Product Id in A1, Product Name in B1 and MRP in C1, with 14 products in rows 2 to 15.
The master skips Product-5, Product-10, Product-14 and Product-18. Those four are the unmatched cells you will highlight.

Part 1: Understand the Logic First
Step 1: The rule needs a TRUE or FALSE answer
With Use a formula to determine which cells to format, Excel formats a cell when your formula returns TRUE and leaves it alone when it returns FALSE. So you need a formula that says TRUE when a product is not found in the master.
Step 2: Test the formula in a spare column
In D2 of the Sales sheet, enter the first formula and fill it down to D19:
=ISERROR(VLOOKUP(A2,'Product Master'!B:B,1,0))Rows 6, 11, 15 and 19 return TRUE (Product-5, -10, -14 and -18). Every other row returns FALSE. Once the results look right, copy the formula text and delete the column.
Part 2: Highlight Unmatched Cells in Excel with Conditional Formatting
Step 3: Create the rule
- On the Sales sheet, select A2:A19 so that A2 is the active cell.
- Go to Home > Conditional Formatting > New Rule. PK’s shortcut is Alt+O+D to open the Rules Manager, then N for New Rule.
- Choose Use a formula to determine which cells to format.
- Paste one of the three formulas below into Format values where this formula is true.
- Click Format, pick a fill colour on the Fill tab (PK uses yellow) and click OK twice.

Formula 1: ISERROR + VLOOKUP
=ISERROR(VLOOKUP(A2,'Product Master'!B:B,1,0))VLOOKUP(A2,'Product Master'!B:B,1,0)looks for the product in column B of the master and returns the product name itself (column 1 of the range). The last argument, 0, forces an exact match.- When the product is missing, VLOOKUP returns
#N/A. ISERROR(...)turns that error into TRUE and a found value into FALSE. TRUE means highlight.
Formula 2: ISERROR + MATCH
=ISERROR(MATCH(A2,'Product Master'!B:B,0))MATCH(A2,'Product Master'!B:B,0)returns the position of the product in column B: 2 for Product-1, 3 for Product-2 and so on, because row 1 holds the header.- For a product that is not there, MATCH returns
#N/A, which ISERROR turns into TRUE. - MATCH is lighter than VLOOKUP because it only finds a position and does not fetch a value.
Formula 3: COUNTIF equal to 0
=COUNTIF('Product Master'!$B$2:$B$15,A2)=0COUNTIF('Product Master'!$B$2:$B$15,A2)counts how many times the product appears in the master list: 1 if it is there, 0 if it is not.=0turns the count into a test: 0=0 is TRUE, so a missing product is highlighted.- The master range is absolute ($B$2:$B$15) so it stays fixed for every cell, while
A2is relative and moves down the list. This is the version saved in the practice workbook. In the video PK tests it with the whole column B:B, which works too.
All three formulas highlight the same four cells: Product-5, Product-10, Product-14 and Product-18.
Step 4: List the unmatched products with Filter by Color
Select the header row, turn on Data > Filter, open the drop-down on Product Name and choose Filter by Color with the yellow fill. Only the four new products remain visible, ready to be added to the master.
A one-click alternative from the video
At the end of the video PK uses the Highlight Unmatched Value button of his free PK’s Utility Tool add-in: select the product list, click the button, select the master range and click OK. The unmatched products are highlighted without writing a rule.
Modern Excel Options (Addition)
These options are additions to the video, based on standard Excel behaviour. They need Excel 2021 or Microsoft 365.
XMATCH instead of MATCH
=ISNA(XMATCH(A2,'Product Master'!$B$2:$B$15)) does the same job. XMATCH uses an exact match by default, and ISNA reacts only to the not-found error, so a real problem such as a broken reference is not silently treated as a new product.
Get a list of the unmatched values
If you want the missing products in a list instead of colours, enter this in an empty cell of the Sales sheet:
=FILTER(A2:A19,COUNTIF('Product Master'!B2:B15,A2:A19)=0,"All matched")It spills Product-5, Product-10, Product-14 and Product-18, and shows All matched when nothing is missing.
Check the other direction
To find master products that never appear in the sales data, select B2:B15 on the Product Master sheet and use =COUNTIF(Sales!$A$2:$A$19,B2)=0. In the practice file nothing is highlighted, because every master product has a sale.
Common Errors and Fixes
Every cell, or the wrong cell, is highlighted
The active cell was not A2 when you entered the formula, so the relative reference points to another row. Open Manage Rules, check that Applies to starts at A2 and that the formula uses A2.
A product that is in the master is still highlighted
The two values only look the same. Extra spaces (Product-5 with a trailing space) or a number stored as text in one list and as a number in the other both break the match. Clean the data with TRIM, or convert the numbers so both lists use the same type.
The rule breaks when applied to more columns
If you apply the rule to A2:C19 to colour the whole row, relative references shift for each column. Lock the column: =COUNTIF('Product Master'!$B$2:$B$15,$A2)=0.
Tips
- Test any conditional formatting formula in a spare column first. If TRUE and FALSE are right there, the highlighting will be right too.
- Turn the master into an Excel Table, or use a whole-column reference as in the video, so new master products are included automatically.
- COUNTIF is the easiest version to read later; VLOOKUP and MATCH are useful when you already know those functions well.
- Microsoft’s article on using conditional formatting to highlight information explains every rule type and the Rules Manager.
Want It Ready-Made?
If you keep a product master and record sales or stock against it, the Product Inventory Data Entry System in Excel on NextGenTemplates.com gives you a ready product list and entry form to work with, and the Dynamic Conditional Formatting in Excel template shows more rule ideas. See all inventory management templates in Excel. To master VLOOKUP, MATCH, COUNTIF and the newer lookup functions, take PK’s Excel AI Mastery: 100 Formulas course.
Related Tutorials
- How to Check Common Names Between Two Lists in Excel
- Highlight Duplicate or Unique Values in Excel
- Highlight Consecutive Duplicates in Excel
- COUNTIF Function in Excel with Examples
- XLOOKUP and XMATCH Function Step by Step
Frequently Asked Questions
How do I highlight cells that are not in another list in Excel?
Select the list to check, create a conditional formatting rule with Use a formula to determine which cells to format, and use a formula that returns TRUE when the value is missing from the other list, such as COUNTIF of the other list equal to 0. Part 2 shows all three formulas.
Can conditional formatting refer to another worksheet?
Yes. In current versions of Excel you can point the rule at a range on another sheet, as this tutorial does with the Product Master sheet. Very old versions such as Excel 2007 needed a named range for this.
Which formula is best: VLOOKUP, MATCH or COUNTIF?
All three give the same result here. COUNTIF is the simplest to read, MATCH is light and fast, and VLOOKUP is familiar to most users. Pick the one you understand best.
Why do I need ISERROR with VLOOKUP and MATCH?
VLOOKUP and MATCH return the N/A error when a value is not found. ISERROR converts that error into TRUE, and a found value into FALSE, which is the answer conditional formatting needs.
How can I see only the highlighted products?
Turn on Data, Filter and use Filter by Color on the product column. Only the highlighted, unmatched products stay visible.
About the Author
PK is a Microsoft Excel expert and trainer and the founder of PK: An Excel Expert and NextGenTemplates.com. He has been teaching Excel, VBA, Power Query and Power BI since 2016 on his YouTube channel. For more rules like this one, follow his free conditional formatting course.
Conclusion
To highlight unmatched cells in Excel, select the list with the first cell active and add a formula rule that returns TRUE when a value is missing from the other list: =COUNTIF('Product Master'!$B$2:$B$15,A2)=0, or the ISERROR versions with VLOOKUP or MATCH. New products stand out the moment they appear in your sales data, and Filter by Color lists them for you. Download the practice workbook and try all three formulas on your own lists.



