How to Highlight Differences in Two Excel Columns

Last updated on November 9th, 2026 at 01:47 pm

To highlight differences between two columns in Excel, select both columns starting with the column you trust (for example, A2:B100), press Ctrl + \ (backslash), and Excel selects every cell in the second column that doesn’t match its neighbor on the same row. Click Home > Fill Color to color them. For highlighting that updates on its own as you edit, add a conditional formatting rule with the formula =$A2<>$B2. If the two lists are in different orders, use a COUNTIF rule instead so Excel looks for each value anywhere in the other column.

Applies to: Excel for Microsoft 365 (Windows and Mac), Excel 2024, Excel 2021 and earlier desktop versions. The conditional formatting methods also work in Excel for the web. The Go To Special steps follow Microsoft’s guide to finding and selecting cells that meet specific conditions.

Pick the right method first

“Different” can mean two things, and the wrong choice gives you a sheet full of false alarms.

Your situationBest methodUpdates automatically?
Each row should match (old price vs new price for the same product)Row differences or the same-row ruleRow differences: no. Rule: yes
Two lists in any order (last month’s customers vs this month’s)COUNTIF ruleYes
Capital letters matter (ABC-1 vs abc-1)EXACT ruleYes
You need a list of the differences, not just colorsHelper column or FILTERYes

A quick test: if sorting one column would ruin the comparison, you have row-by-row data. If the order doesn’t matter, you have two lists.

Select the right range first

  • Know your active cell. When you drag across a range, the cell you started in stays white while the rest turns gray. That’s the active cell, and both Go To Special and formula rules measure everything from it. Start your selection in the top-left cell of the data, below the header.
  • Leave headers out. Select from row 2 down so the header row isn’t compared.
  • Use a range a bit larger than your data if you expect to add rows, for example A2:B500. Blank pairs match each other, so the extra rows stay uncolored.
  • Normal comparisons ignore case. Excel treats “Smith” and “SMITH” as equal unless you use the EXACT function.

Method 1: Highlight row differences with Go To Special

This is the fastest one-time check, and it doesn’t need any formula. Say column A has last month’s prices and column B has this month’s.

  1. Click cell A2 and drag down and across to the last row of column B, for example B100. Starting in column A makes column A the reference that column B is checked against.
  2. Press Ctrl + \. If the shortcut doesn’t respond (some keyboard layouts put the backslash elsewhere), go to Home > Find & Select > Go To Special, choose Row differences, and click OK.
Go To Special dialog in Excel with the Row differences option selected over two selected price columns
Start the selection at A2 so the white active cell makes column A the reference. In Go To Special, select Row differences and OK. The recreated sample differs only at B4, B7 and B9.
  1. Look at the selection. Only the column B cells that differ from column A on the same row are still selected. If Excel says “No cells were found,” the two columns match on every row.
  2. Without clicking anywhere else, select Home > Fill Color and pick a color such as yellow.
Two Excel columns of prices with the three changed cells in column B filled yellow
After applying yellow fill to the selected differences, only B4, B7 and B9 are colored. This recreated result uses static fill, so it will not update automatically when values change.

The fill is ordinary formatting. It won’t change if someone edits a value later, so run the steps again after the data changes. A blank cell next to a filled cell counts as a difference. For other ways to apply a fill by hand, such as an exact RGB or hex shade, see the manual fill options for Excel cells.

On a Mac, open the Go To dialog from Edit > Find > Go To, click Special, and choose Row differences. If you can’t find Go To Special in Excel for the web, use Method 2, which works there.

What if the two columns are on different sheets?

Include the sheet name in the formula, for example =A2<>'Last Month'!A2, as long as both sheets line up row for row. The full process, including side-by-side viewing, is covered in comparing two sheets in Excel for matches.

Method 2: Conditional formatting for same-row differences

A conditional formatting rule recolors cells by itself whenever a value changes, which makes it the better choice for a sheet people keep editing.

  1. Select A2:B100, starting at A2.
  2. Go to Home > Conditional Formatting > New Rule. On a Mac, if the dialog shows a Style box, set it to Classic.
  3. Choose Use a formula to determine which cells to format.
  4. In the formula box, type =$A2<>$B2. The <> means “is not equal to.”
New Formatting Rule dialog using a formula to compare columns A and B and highlight unequal values in each row
Use a formula to determine which cells to format, then enter =$A2<>$B2. The locked columns and relative row compare each row’s two prices; the light red preview shows the chosen format.
  1. Click Format, open the Fill tab, pick a color, and click OK twice.

Both cells in every mismatched row are now colored. Type a new value into column B and the color appears or disappears right away.

The dollar signs matter. $A2 locks the column but lets the row move, so row 7 compares A7 with B7. Without them, Excel would compare the wrong cells in column B. If you type $A$2 by mistake, every row is compared with row 2, and the colors look random.

To flip the rule and color matching rows instead, use =$A2=$B2. To color only column B, select just B2:B100 at the start; the formula stays the same.

Method 3: Highlight values missing from the other list

Use this when the two columns are separate lists in different orders, such as customer emails exported from two systems. Excel checks whether each value appears anywhere in the other column.

  1. Select A2:A100.
  2. Go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format.
  3. Enter =COUNTIF($B$2:$B$100,$A2)=0, choose a fill color, and click OK twice. Values in A that never appear in B are now colored.
  4. Select B2:B100 and create a second rule with =COUNTIF($A$2:$A$100,$B2)=0, ideally in a different color, so you can tell “only in A” from “only in B.”
Two lists of example email addresses with values missing from the other list highlighted in two colors
With COUNTIF rules applied, orange marks addresses only in List A and blue marks addresses only in List B. The fictional examples include sam and morgan only in A, and devon and riley only in B; list order does not matter.

Here the lookup range has dollar signs on both the column and the row ($B$2:$B$100) so it never shifts, while $A2 still moves down one row at a time. COUNTIF also works with whole columns, such as $B:$B, if your lists keep growing. To learn more about how the function counts, see this guide to using COUNTIF in Excel.

No-formula shortcut: the Unique rule

Select both columns and choose Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values. In the first drop-down, change Duplicate to Unique, pick a format, and click OK. Excel colors values that appear only once across both columns.

It’s quick, but it has a catch: it treats both columns as one big list. A value repeated twice in column A and missing from column B won’t be colored, because it isn’t unique. When either list can contain repeats, the COUNTIF rules above are more reliable.

Should I delete the duplicates once I find them?

Only after you’ve reviewed them. Highlighting changes nothing in your data, so it’s a safe first step. When you’re ready, the guide to removing duplicates in Excel walks through several ways to delete repeats, including one that leaves your original list untouched.

Method 4: Case-sensitive comparison

For product codes, passwords or IDs where capitalization matters, create a formula rule on A2:B100 with =NOT(EXACT($A2,$B2)). EXACT returns TRUE only when two values match character for character, including case, and NOT flips that so the rule colors the mismatches. “ABC-1” next to “abc-1” is now highlighted, while Methods 1 to 3 would treat them as equal.

Method 5: List the differences in a helper column

Colors are easy to see but hard to count or send to someone. A helper column gives you something you can filter.

  • Same row: in C2, enter =IF($A2=$B2,"Match","Different") and double-click the fill handle (the small square at the bottom-right corner of the cell) to copy it down. Then select Data > Filter and show only “Different.”
  • Any order: =IF(COUNTIF($B$2:$B$100,$A2),"Found","Missing") labels each value in column A.
  • Count the changes: =SUMPRODUCT(--($A$2:$A$100<>$B$2:$B$100)) returns how many rows differ.
  • A separate list of missing values (Excel for Microsoft 365, Excel 2021 and later): =FILTER(A2:A100,COUNTIF(B2:B100,A2:A100)=0,"None missing") spills every value from column A that’s missing from column B into the cells below. The last argument shows “None missing” instead of a #CALC! error when everything matches.

Why cells that look the same get highlighted

If a pair of cells looks identical but is still colored, the values aren’t really the same. Check these first:

  • Extra spaces. “Jordan Lee” and “Jordan Lee ” don’t match. Click the cell and look at the end of the text in the formula bar. Clean a copy of the data with =TRIM(A2), or compare trimmed values in the rule: =TRIM($A2)<>TRIM($B2).
  • Numbers stored as text. 100 and “100” are different to Excel. Text numbers usually sit on the left edge of the cell and show a small green triangle. Select them, click the warning icon, and choose Convert to Number.
  • Hidden decimals. 10.004 displays as 10.00 with two decimal places. Compare rounded values: =ROUND($A2,2)<>ROUND($B2,2).
  • Dates as text. A real date and the text “10/26/2026” don’t match. Real dates align right by default; text dates align left.
  • Rows out of line. If one column has an extra or missing row, every row below it looks different. Sort both columns the same way or switch to Method 3.

If nothing is colored at all, open Home > Conditional Formatting > Manage Rules, set Show formatting rules for to This Worksheet, and check that the formula and the Applies to range are what you expect. A rule written for row 2 but applied to a range that starts on row 1 is the most common cause.

Will sorting or adding rows break the rule?

Sorting both columns together is fine, because the rule follows the rows. Inserting rows inside the range expands the rule automatically, but rows typed below the end of the range aren’t covered. Edit the Applies to box in Manage Rules, or start with a larger range.

Check the result and remove the highlighting

To confirm a rule is working, change one value in column B so it matches column A. That row’s color should disappear immediately. Press Ctrl + Z to put the value back.

To remove conditional formatting, select the cells and choose Home > Conditional Formatting > Clear Rules > Clear Rules from Selected Cells (or from Entire Sheet). Clearing rules doesn’t touch fills you added by hand, so for Method 1, select the cells and choose Home > Fill Color > No Fill.

For a one-time check, Ctrl + \ and a fill color is all you need. For a sheet you’ll keep updating, set up the =$A2<>$B2 rule once and let Excel flag new changes for you. To build other color rules from formulas, such as coloring overdue dates or low stock, see making a cell turn a color with a formula, or the broader guide to conditional formatting in Excel.