Duplicate data is a common problem in any spreadsheet—especially when working with large datasets, imported lists, survey results, or manually entered records. Duplicate rows can cause inaccurate calculations, reporting errors, and confusion for collaborators.
In this guide, we’ll show you how to find and remove duplicate rows in Google Sheets using multiple methods, both manual and automated. Whether you want to delete duplicates, highlight them, or extract unique entries, this step-by-step article has you covered.
Duplicate rows may appear in your data due to:
Manual copy-paste errors
Merged spreadsheets
Form responses with repeated submissions
Appended data from external sources
API integrations adding redundant data
Regardless of the cause, identifying and removing these rows is critical for clean and reliable data.
This is the fastest and simplest method.
Open your Google Sheet.
Select the range of rows and columns you want to check.
Click Data > Data cleanup > Remove duplicates.
In the popup:
Check “Data has header row” if your selection includes headers.
Choose the columns to check for duplicates.
Click “Remove duplicates.”
Google Sheets will show how many duplicate rows were found and removed.
Ideal for small to medium datasets.
Quick cleanup after importing or copying data.
If you want to review duplicates before removing them, highlighting is a safer option.
Select the column or range you want to check for duplicates.
Click Format > Conditional formatting.
Under “Format cells if”, select “Custom formula is”.
Enter this formula (assume data starts in A2):
=COUNTIF(A:A, A2) > 1
Choose a background color (e.g., red or yellow).
Click “Done.”
Now, all duplicates in that column will be highlighted.
If you want to highlight rows where the full row is duplicated:
Combine the row’s values into a helper column using:
=A2&B2&C2&D2
Apply the same COUNTIF formula to the helper column.
The UNIQUE function automatically removes duplicates and shows only the first occurrence of each unique row.
In a new sheet or empty area, enter:
=UNIQUE(A2:D)
Replace A2:D with your actual data range.
This will return a list of unique rows.
Keeps your original data intact.
Good for generating summary tables.
Works dynamically if new data is added.
For more control or to schedule duplicate removal, use a custom script.
Click Extensions > Apps Script.
Delete the default code and paste:
function removeDuplicatesFromSheet() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var data = sheet.getDataRange().getValues();
var uniqueData = [];
var stringifiedRows = new Set();
for (var i = 0; i < data.length; i++) {
var rowString = JSON.stringify(data[i]);
if (!stringifiedRows.has(rowString)) {
uniqueData.push(data[i]);
stringifiedRows.add(rowString);
}
}
sheet.clearContents();
sheet.getRange(1, 1, uniqueData.length, uniqueData[0].length).setValues(uniqueData);
}
Save and click Run to remove duplicate rows.
Authorize the script on first run.
Good for automated cleanup.
Handles large datasets with multiple duplicate rows.
Pivot tables can help you count how many times a row or value appears.
Select your data and click Insert > Pivot table.
Set the pivot to appear in a new sheet.
Add the column(s) you want to check to Rows.
Add the same column to Values, using the COUNTA function.
Sort by count > 1 to find duplicates.
This method is more analytical and helps you understand how many duplicates exist, without deleting anything.
If you work with spreadsheets frequently, you may want to install an add-on.
Go to Extensions > Add-ons > Get add-ons.
Search for Remove Duplicates.
Install the add-on.
Launch it and follow the step-by-step wizard.
These tools often include advanced features like:
Partial duplicate matching
Fuzzy matching (typos)
Multi-column selection
Data backup before removal
Use data validation to restrict repeated entries.
Lock key columns to prevent accidental copy-paste errors.
Use Google Forms with email collection to prevent multiple submissions.
Use filters or query functions to work with clean views.
Create automated workflows using Google Apps Script.
Duplicate data may seem harmless, but it can quietly disrupt calculations, reports, and business decisions. Google Sheets offers multiple powerful methods—from built-in tools and formulas to custom scripts and third-party add-ons—for finding, highlighting, and removing duplicate rows.
By following the right method based on your dataset size and complexity, you can keep your spreadsheets clean, efficient, and trustworthy.