In Excel: copy the data first, select the whole table, then Data ▸ Remove Duplicates. Confirm the header setting and tick the columns that define a duplicate. Excel keeps the first matching record; UNIQUE returns a separate list of distinct rows or values.
On this page7
Make a copy, then select all columns of the records, including headers.
On the Data tab, click Remove Duplicates.
Confirm My data has headers and tick only the columns that define the comparison key.
Confirm, check the removed count, and verify which complete records remain before saving.
For a separate list on Microsoft 365 or Excel 2021/2024, use UNIQUE in an empty area and choose the input columns for the intended output.
What this does
Remove Duplicates changes the selected data in place. Its checked columns form the comparison key: checking Email alone can delete a record with a different amount, while checking Email and Amount requires both to match. Keep the full record range selected so values stay together. UNIQUE over several columns compares entire rows; it does not select the first whole record for each email address. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “flag duplicates in excel”. Start on a copy or a tiny sample, keep the affected duplicates visible, and compare the result with the outcome you expected before you touch the real workbook. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. The point is a data step that keeps your analysis trustworthy, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
A1:B5 has headers Email and Amount, followed by ada@example.com/10, ben@example.com/20, ada@example.com/30 and ben@example.com/20. On a copy, select A1:B5 and confirm headers. Tick Email only: Ada/10 and Ben/20 remain, with 2 records removed. Restore a fresh copy and tick both columns: Ada/10, Ben/20 and Ada/30 remain, with only 1 removed. =UNIQUE(A2:B5) in D2 returns those 3 distinct rows on supported versions; =UNIQUE(A2:A5) returns only 2 email addresses. Duplicate rows quietly inflate counts, totals and mailing lists. Removing them — or surfacing them with UNIQUE and COUNTIF — is a basic data-hygiene step before any analysis you want to trust. A practical tip: try it on a copy of the sheet or a handful of sample rows first and check the result before you apply it to the real data. That one habit catches almost every surprise while it is still cheap to reverse.
In Google Sheets
Function availability: UNIQUE: Excel 2021+. These are Microsoft's version markers; earlier perpetual releases do not include these functions. Check the actual product and update channel before using the formula. A marker does not establish an identical Web/Mac workflow or Google Sheets support. Keep this page bookmarked for the next time the same question comes up. Better still, repeat the steps once in your own workbook — doing it yourself is what turns a copied answer into something you remember. Treat “flag duplicates in excel” as a routine rather than a one-off. Once you know which setting or command controls it, the same few steps handle every workbook where it comes up in Excel, and you can explain them to a colleague in a sentence.
Common mistakes
- Selecting only one column, so Remove Duplicates shrinks that column out of step with its row.
- Forgetting it edits in place — make a copy first if you might need the duplicates back.
- Ticking every column when only one (like an ID) actually defines a duplicate.
- Treating
UNIQUEover the entire table as equivalent to removing duplicates by one selected key. - Overlooking stray spaces or different display formats; inspect the compared cells before changing the data.
Frequently asked questions
Remove Duplicates or UNIQUE?
Remove Duplicates changes the selected records and keeps the first match for the checked columns. UNIQUE returns a live separate array of distinct rows or values. UNIQUE(A2:B5) compares both columns, not just the email key.
How do I find duplicates without deleting them?
Use Conditional Formatting ▸ Highlight Cells ▸ Duplicate Values to colour them, or =COUNTIF(range, cell)>1 to flag them.
Why are visible duplicates not removed?
Check the selected comparison columns, stray spaces and cell display formats. A difference in another checked column is enough to keep the row. Inspect the key before cleaning or deleting records.