How to Compare Two Columns or Two Sheets in Google Sheets to Find Matches and Duplicates (2026)

The common version of this question: you have a master list and another list, and you need to know who is on both, who is only on one, or which rows to delete from the first because they appear in the second. A mailing list against an unsubscribe list, last month's customers against this month's, an invitation list against RSVPs. Google Sheets has no single “compare” button, but a few formulas cover it. This guide goes through them, plus the checks that stop a comparison quietly giving the wrong answer.

Step 0: make both lists comparable

A comparison only matches values that are identical. The usual reasons two entries that look the same do not match are a stray leading or trailing space, a non-breaking space pasted in from a web page or PDF, text versus numbers (00123 as text against 123), and different spellings of the same email. The formulas below ignore letter case, but they do not ignore spaces. If your lists are messy, build a cleaned helper column first and compare that:

=LOWER(TRIM(SUBSTITUTE(A2, CHAR(160), " ")))

TRIM removes extra spaces at the ends and collapses runs inside, and SUBSTITUTE turns non-breaking spaces (character 160) into ordinary ones first. Fill it down next to each list and compare the helper columns instead of the originals.

Two columns on the same sheet

Say list one is in A2:A and list two in C2:C. In B2, flag each item of list one that also appears in list two:

=IF(A2="", "", IF(COUNTIF($C$2:$C, A2) > 0, "In both", "Only in list 1"))

Do the mirror image in D2 for list two (=IF(C2="", "", IF(COUNTIF($A$2:$A, C2) > 0, "In both", "Only in list 2"))). Or, to produce the lists directly, in empty cells:

Items in both:      =IFERROR(FILTER(A2:A, A2:A<>"", COUNTIF(C2:C, A2:A) > 0), "None")
Only in list 1:     =IFERROR(FILTER(A2:A, A2:A<>"", COUNTIF(C2:C, A2:A) = 0), "None")
Only in list 2:     =IFERROR(FILTER(C2:C, C2:C<>"", COUNTIF(A2:A, C2:C) = 0), "None")

These return live lists that update when either column changes. COUNTIF(C2:C, A2:A) inside FILTER works through an array of criteria, which is why it can return one answer per row.

Two tabs in the same spreadsheet

The same formulas work with a sheet name in front of the range. With a Contacts tab and an Unsubscribes tab, put this in a helper column on Contacts (row 2, email in column C, unsubscribe emails in column A of the other tab) and fill down:

=IF(C2="", "", IF(COUNTIF(Unsubscribes!$A$2:$A, C2) > 0, "Unsubscribed", ""))

The C2="" guard means a blank email is not marked Unsubscribed just because the other tab has a blank cell. Filter that column on Unsubscribed, delete those rows, then remove the helper column. To get the keep-list without touching the original, use =FILTER(Contacts!A2:D, COUNTIF(Unsubscribes!A2:A, Contacts!C2:C) = 0). If you want to find the names, not drop them, highlight instead: select the email column on Contacts, open Format › Conditional formatting, choose Custom formula is and enter =AND($C2<>"", COUNTIF(INDIRECT("Unsubscribes!A2:A"), $C2)>0). (Conditional formatting rules cannot point at another tab directly, so the reference goes through INDIRECT.)

Two different spreadsheets

When the other list lives in another file, pull it into a tab with IMPORTRANGE:

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/YOUR_FILE_ID/edit", "Sheet1!A2:A")

The first time, Sheets asks you to allow access between the two files. Put the formula on a helper tab, then compare against that tab as above. The imported list is live, which is handy, but it also means deleting the source or losing access breaks your comparison.

Matching on more than one column

If a row only counts as a match when several columns agree, such as first name, last name and postcode, join them into one key in each list and compare the keys:

=LOWER(TRIM(A2)) & "|" & LOWER(TRIM(B2)) & "|" & LOWER(TRIM(C2))

The | separator stops Ann + Marie Lee from matching Ann Marie + Lee. Alternatively, a lookup that returns a value from the second list for each match is =IFERROR(INDEX(Other!B:B, MATCH(A2, Other!A:A, 0)), "not found") (the 0 means exact match). MATCH returns the position of the first match only.

Things that go wrong

Compare tabs without writing the formulas? SheetDupes (disclosure: we make it) is a Google Sheets add-on whose Compare feature looks at another tab in the same spreadsheet and can preview, highlight or remove the rows that appear in both lists (or only on this one), for example removing everyone who is on an Unsubscribes tab from a Contacts tab. Only the tab you are on is changed, the other tab is left alone, and a backup tab is copied before anything is removed. You pick the match columns and their type (Text, Email or Phone), and it ignores extra spaces and, if you ask it to, letter case and punctuation. Preview and Highlight are free on any size sheet; the 14-day free trial needs no credit card, and removing remains free after the trial on sheets with up to 2,000 data rows during launch (through Jan 31, 2027; 500 after that). It only works inside the spreadsheet you have open and your data is not sent to Loomwise. Comparing across two separate files is not what it does: use IMPORTRANGE above to bring the other list in as a tab first. It is live on the Google Workspace Marketplace.
Install free from Google Workspace MarketplaceSee SheetDupes
Want to test it first? Try it on sample data (makes a copy of a 12-row example sheet in your Drive).

Related guides

Instructions refer to Google Sheets as it worked on November 16, 2026. Google Sheets is a trademark of Google LLC and this site is not affiliated with Google. Questions or corrections: hello@loomwise.app.