List Compare

Two columns out of two different spreadsheets — invited and attended, shipped and received, last month's SKUs and this month's — and the question is always the same three-way split. Paste one into each box; the counts and the four lists come out below, ready to paste back into a sheet.

List Compare — Find What Two Lists Share and What Only One of Them HasBuildFigure

Exactly what counts as a match

Each line is one item. Empty lines are dropped before anything else happens, so trailing blank lines from a spreadsheet paste do not become phantom items.

Two items match when their comparison keys are identical, and the key is built in a fixed way. With trimming on, whitespace at the start and end of the line is removed first — this affects the key and the item as displayed in the results. With "ignore case" on, the key is lowercased, but the item is shown in its original case; when the same item appears in both lists with different capitalisation, the copy from list A is the one displayed. Whitespace inside the line is never touched: M6 x 20 and M6 x 20 are always different items regardless of the settings.

PairDefault settingsBoth options off
ACME-01 / acme-01matchno match
ACME-01 / ACME-01  matchno match
ACME 01 / ACME  01no matchno match
ACME-01 / ACME‑01 (non-breaking hyphen)no matchno match

The last row is the one that catches people. Characters that look identical but are not — non-breaking spaces, non-breaking hyphens, curly versus straight apostrophes, full-width characters pasted out of an East Asian input method — never match, and there is no setting for it because guessing which lookalikes to fold would silently merge things that are genuinely different. Normalise those before comparing, either in the source spreadsheet with SUBSTITUTE or through the batch line cleaner.

What deduplication does to the counts

With "collapse duplicates within each list" on, a value appearing three times in list A is counted once and shown once. That is what you want when you are reconciling two rosters and it is not what you want when the duplicates are the thing you are investigating. Turn it off and the counts become raw line counts: the "in both" block then lists every occurrence from A that has a counterpart in B, so a value appearing three times in A shows three times.

To find duplicates within a single list rather than across two, this is the wrong tool — paste the list into the line tools page, which reports how many lines deduplication removed.

Ordering of the output

By default each block preserves the order the items appeared in their source list, which matters when the list is chronological or already sorted the way you want it. Switching sorting on uses the browser's English collator with numeric ordering, so item2 precedes item10, and with base-letter sensitivity, so case and accents do not split otherwise-adjacent entries. Non-Latin scripts sort consistently but not in their own locale's dictionary order.

Comparing on more than one column

Copy two columns out of a spreadsheet and you get one line per row with a tab between the fields. That works, but it changes the question: two rows now match only if both fields are identical, which is a strict join and is often not what you meant. A row where the email matches but the display name was updated will show up as a difference in both directions.

The usual fix is to compare on the identifying column alone — the email, the SKU, the employee number — get the three-way split, and then look up the full rows for whichever group you care about back in the spreadsheet. Comparing on names is the classic mistake: two people called J. Smith are indistinguishable to any tool, including this one.

Questions people ask

How many lines can it handle?

The two boxes together are capped at 400,000 characters, which is on the order of tens of thousands of lines for typical items like emails or part numbers. Comparison itself is fast because both lists are indexed into hash sets rather than scanned pairwise, so the practical limit is the size of the result panels rather than the matching. For very long results use the copy buttons and read them in a spreadsheet.

Why does an item show in "only in A" when I can see it in B?

Something differs between the two strings that you cannot see. In order of likelihood: case, when "ignore case" is off; whitespace at the end of the line, when trimming is off; a non-breaking space or non-breaking hyphen pasted in from a web page or a formatted document; different apostrophes, straight versus curly; and internal spacing, which this tool never normalises. Copy the two items into a text editor and check their lengths, or run both lists through the batch line cleaner first.

Can I get the items that are in neither list?

There is no such set — with only two lists, every item you have supplied is in at least one of them. If you mean items from a third master list that appear in neither A nor B, do it in two passes: compare A and B, copy the combined block, and then compare that against the master list. The "only in master" block is your answer.

Does any of this get uploaded?

No. Both lists stay in the page and the comparison runs in JavaScript on your machine. Closing the tab discards everything; there is no server to store it on. That is worth knowing when the lists are customer emails or staff records, which is most of the time for this kind of job.

Related