How to MATCH 2 Columns in Excel

There are two ways to “match 2 columns in excel”: the quick way you copy and the durable way you understand. This page gives you both. The exact Excel answer is above with a tool to test it; below, we build the small mental model that makes the fix stick, so the next variation of the same problem solves itself.

Exact answer

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
ƒxCompare Two ListsLive
Values in both lists
2

Only in A: 2 · Only in B: 1

=COUNTIF(B:B,A2)>0
=A2=B2
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

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. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. For “match 2 columns in excel”, 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 data step that keeps your analysis trustworthy 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. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.

In Google Sheets

Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. Here is the takeaway for “match 2 columns in excel”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.

Common mistakes

  • Using =A2=B2 when 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; TRIM both 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 “match 2 columns in excel” and “match 2 column values in excel” — 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. “match 2 columns in excel”, “match 2 column values in excel” all point at the one operation explained on this page, which is why they all lead here.