Text & Google Sheets cleanup · 4 min read

Remove Duplicates in Google Sheets Without Losing Distinct Records

A repeated ID is not always a duplicate record. Decide whether you want one copy of each complete row or one record per business key before removing anything.

Define the columns that make a duplicate

The sample has five data rows. E01, Ada, Seoul appears twice, so one copy can be removed under an exact full-row rule. E01, Ada, Busan differs in city and stays in the result. It may represent another valid record or a source conflict; the duplicate-removal step does not decide which.

Write the rule in plain language before selecting columns. For example: remove rows only when member_id, name, and city are the same. If you instead need one current address per member, you also need evidence such as a verified update timestamp or a trusted source priority.

Intended resultCompare these fieldsReview needed
One copy of each full rowAll business columnsCheck formatting and hidden text issues.
One member per IDmember_idResolve differing names or cities first.
One member per citymember_id and cityCheck whether name differences matter.
Rows that occur only onceAll selected fields with exactly_onceRepeated groups disappear entirely.

Preview the result with UNIQUE

Import or place the sample in A1:C6, with the header in row 1. Keep E2:G6 empty and enter =UNIQUE(A2:C6) in E2. Copy the three headers to E1:G1. This keeps the original table available while you inspect the four-row result.

UNIQUE returns rows in their first-appearance order. Its normal behavior retains one representative of each distinct row. The optional exactly_once argument means something different: TRUE removes every member of a repeated group. That is useful for finding unrepeated rows, but it is not the usual request to keep one copy.

Two different duplicate policies
Keep one copy of each distinct row:
=UNIQUE(A2:C6)
Expected data rows: 4

Keep only rows that never repeat:
=UNIQUE(A2:C6,FALSE,TRUE)
Expected data rows: 3
Two identical E01 Ada Seoul rows reduce to one, while E01 Ada Seoul and E01 Ada Busan remain distinct.
Illustrated example. Synthetic comparison under the all-three-columns rule: a repeated identifier alone does not establish a duplicate row.

Remove duplicates from a reviewed copy

When a fixed cleaned table is the desired output, duplicate the source sheet or copy its values to a working tab. Select the exact table range including the header and every associated column. Avoid selecting only the ID cells, which makes the intended record boundary unclear.

Open Data > Data cleanup > Remove duplicates. Mark that the data has a header row and select member_id, name, and city for this example. Run the operation, then verify that five data rows became four and that the Busan entry for E01 remains.

  1. Create a working copy and record the original five-row count.
  2. Select A1:C6, then open Remove duplicates.
  3. Enable the header setting and compare all three columns.
  4. Verify the remaining records against the expected output.
  5. Keep a note of the compared columns with the cleaned file.

Check the resulting records, not just the count

A result with four rows could still be wrong if the selected rule removed a distinct record and retained an unwanted row. Compare the record values as well as the total. In this example, both E01 cities must remain after full-row deduplication.

Google documents that the Remove duplicates command can regard matching values as duplicates despite differences in letter case, formatting, or formulas. Do not use the command as a case-sensitive identity validator. If case matters to your identifier specification, use a separate exact-comparison review and demonstrate the intended behavior on a small copy before modifying the full dataset.

Five source records become four distinct rows while retaining the E01 record for each of two cities.
Illustrated example. Synthetic expected output: only the second identical Seoul row is redundant under this rule.

Clean carefully before making the result permanent

Trailing spaces and other hidden text can make apparently identical entries differ. If normalization is appropriate, create reviewed helper values using a consistent whitespace rule, then deduplicate on those values. Check whether normalization merges keys that were previously distinct; the cleaner-looking result is not automatically the correct business result.

Keep formula output separate from a final snapshot. If you need a stable handoff, copy the reviewed UNIQUE result and paste values into a new output area. Do not assume future rows will be included in a bounded A2:C6 formula; update the range deliberately. The Column Harbor checker does not execute Sheets cleanup commands or decide duplicate identities.

Related help: Check nonbreaking spaces before deciding rows are duplicates

Common questions

Why does UNIQUE still show two rows with the same ID?

When the range includes several columns, differences in any included field can make the rows distinct. Use an ID-only range only when you want an ID list, not a complete authoritative record per ID.

Is UNIQUE with exactly_once TRUE the same as Remove duplicates?

No. exactly_once TRUE excludes a whole repeated group. Default UNIQUE retains one row from that group.

How do I keep the newest record for each ID?

First define and validate a timestamp and a tie-breaking rule. Review conflicting records under that rule before reducing to one row per ID; plain full-row deduplication does not establish which record is newest.

Sources & method

Examples and diagrams use synthetic data. Application instructions follow the linked documentation; available menus and options can vary. Our sample checks do not establish behavior in every Excel or Google Sheets version. Read our AI-assisted editorial method.

Browse all field guides →