In Excel: use =A2=B2 for row-by-row matches, or =COUNTIF($B:$B,A2)>0 to check whether each value in column A appears anywhere in column B.
On this page7
Only in A: 2 · Only in B: 1
What this does
Comparing columns has two different meanings. Row-by-row comparison asks whether A2 equals B2, A3 equals B3, and so on. List comparison asks whether each value from one column exists anywhere in the other column. The first uses a direct equality test; the second uses COUNTIF, MATCH or XLOOKUP. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. For “compare two columns in excel for differences”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected columns change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a layout choice that keeps the sheet readable and sortable useful in real work: repeatable, auditable, and not dependent on memory or luck.
A worked example
Column A has invoice IDs from system 1 and column B has IDs from system 2. In C2, =A2=B2 returns TRUE only when the two rows match exactly. If the rows are not aligned, use =COUNTIF($B:$B,A2)>0 in C2; invoice 1042 returns TRUE if it appears anywhere in B, even on a different row. Column comparison is core spreadsheet reconciliation: invoices, IDs, email lists, product codes, migration checks and any workflow where two systems should agree. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. Nothing on this page is behind a login: the tool runs entirely in your browser, the formula is shown in full with one-click copy, and the steps work the same on Windows and Mac. That is the whole promise here — the exact answer, a way to prove it on your own numbers, and just enough context to make it stick. The short version of “compare two columns in excel for differences”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.
Common mistakes
- Using
=A2=B2when the two lists are sorted differently. - Forgetting absolute references in $B:$B, so the lookup range shifts while copying.
- Treating numbers stored as text as equal to real numbers without cleaning the data.
- Ignoring leading/trailing spaces;
TRIMboth columns when matches look visually identical but fail.
Frequently asked questions
How do I compare two columns row by row?
Use =A2=B2 and fill down. TRUE means the values in that row match exactly.
How do I find values in A that are missing from B?
Use =COUNTIF($B:$B,A2)=0 and filter TRUE results.
Can conditional formatting compare columns?
Yes. Use a formula rule such as =$A2<>$B2 for row differences, or COUNTIF for list membership.
Other ways people ask this
On the way here you may have searched this as “excel compare differences in two columns”, “how to compare two columns in excel for differences”, “excel compare two columns differences” and “how to compare differences in two excel columns” — it is all the same task, and this page is the single, complete answer to it.
Why do people search for this in so many different ways?
Because the same task has many names. “excel compare differences in two columns”, “how to compare two columns in excel for differences”, “excel compare two columns differences” all point at the one operation explained on this page, which is why they all lead here.