How to Compare Multiple Values in Excel
Four ways to compare multiple numbers or text values across columns in Excel — from simple IF formulas to Go To Special for quick spot checks.
Comparing two values in Excel is straightforward: =A1=B1 returns TRUE or FALSE and you're done. Comparing three or more columns is where things get awkward fast — the AND-based formulas grow with every column you add, and DELTA only works on numbers. This article covers four methods, what each one is good for, and where each one breaks down.
The Two-Column Baseline
Before scaling up, here's the right way to compare two values:
=IF(A2=B2, "Match", "No match")
This works for both numbers and text. The DELTA alternative (=IF(DELTA(A2,B2)=1,"Match","No match")) also works, but only for numbers — so there's rarely a reason to reach for it.
Comparing Three or More Columns with AND
For three columns, AND lets you chain equality checks:
=IF(AND(A2=B2, A2=C2), "Match", "No match")
// A2=B2 — checks first against second
// A2=C2 — checks first against third (if both match, all three match)
You only need to compare against one anchor value (column A here) — you don't need every pair. If A=B and A=C, then B=C by implication.
For four columns, add one more check:
=IF(AND(A2=B2, A2=C2, A2=D2), "Match", "No match")
This approach works for both numbers and text. It gets verbose at five or six columns, but it's transparent — you can see exactly what's being compared.
The DELTA function only compares numbers and only accepts two arguments. Don't use it for text, and don't nest it inside AND to compare multiple columns — use = instead.
Counting Deviations with COUNTIF
When you need to know how many values deviate, not just whether there's a mismatch, COUNTIF is cleaner than chaining DELTAs:
=COUNTIF(A2:D2, A2)
// A2:D2 — the range of values to compare
// A2 — the reference value (leftmost cell)
This returns the count of cells that match A2. Subtract from the total number of columns to get the deviation count:
=COLUMNS(A2:D2) - COUNTIF(A2:D2, A2)
If all four values match, this returns 0. If one differs, it returns 1. Works for text and numbers alike.
COUNTIF is case-insensitive for text comparisons. "Apple" and "apple" will count as a match. If case matters, use EXACT inside a SUMPRODUCT instead.
Go To Special for Quick Visual Checks
When you don't need a formula — you just want to spot the outliers fast — Go To Special is the quickest tool:
- Select the columns you want to compare (include all rows with data)
- Press F5 to open Go To, then click Special
- Choose Row Differences and click OK
Excel highlights every cell that differs from the leftmost column in the selection. You can then apply a fill color to make the differences permanent before clicking away.
The highlight from Go To Special disappears the moment you click elsewhere. Apply a cell fill color immediately if you need a permanent visual marker.
This method works for both numbers and text and requires no formulas. It's not practical for recurring comparisons — use it for one-off audits.
Notes & Gotchas
=A1=B1is case-insensitive."DONE"and"done"return TRUE. Use=EXACT(A1,B1)when case matters.- DELTA returns 0 or 1 as a number, not TRUE/FALSE. Don't mix it with logical functions expecting TRUE/FALSE without wrapping it.
- The AVERAGE comparison trick (
=IF(AVERAGE(A2:D2)=A2,"Match","No match")) can produce false positives — two values that differ but average to the same number will appear as a match. Don't use it for anything beyond exploratory spot-checking. - For large datasets where you're comparing entire columns repeatedly, a helper column with a COUNTIF formula is easier to maintain than long AND chains.