Excel Practice Test

โ–ถ

Knowing how to manage duplicate cells in excel is one of the most practical skills any spreadsheet user can develop. Whether you are cleaning up a customer database, reconciling financial records, or preparing data for a VLOOKUP Excel formula, duplicate entries can silently corrupt your results and lead to costly mistakes. Excel provides a rich toolkit for identifying, highlighting, and removing duplicates โ€” and understanding each method gives you the flexibility to handle any data-cleaning scenario with confidence.

Knowing how to manage duplicate cells in excel is one of the most practical skills any spreadsheet user can develop. Whether you are cleaning up a customer database, reconciling financial records, or preparing data for a VLOOKUP Excel formula, duplicate entries can silently corrupt your results and lead to costly mistakes. Excel provides a rich toolkit for identifying, highlighting, and removing duplicates โ€” and understanding each method gives you the flexibility to handle any data-cleaning scenario with confidence.

The challenge with duplicate data is that it rarely announces itself. A sales report might contain the same transaction entered twice on different days. A mailing list might include the same email address with slightly different capitalization. An inventory sheet might repeat a product SKU because two team members updated the file simultaneously. In each case, the duplicates are invisible until you know where to look, and the consequences range from inflated totals to missed shipments to compliance failures.

Excel approaches this problem from multiple angles. The Conditional Formatting tool can instantly colorize every duplicate value in a selected range, making visual identification effortless. The Remove Duplicates feature under the Data tab can eliminate redundant rows in seconds. Power Query offers a more surgical approach for large datasets, while formulas such as COUNTIF and COUNTIFS give you programmatic control that no built-in menu can match. Each method has its ideal use case, and learning all of them transforms you from a passive spreadsheet user into a confident data analyst.

This guide covers every major technique in detail, walking you through the exact steps for each approach. You will learn how to highlight duplicates with Conditional Formatting, how to use COUNTIF to flag duplicates in a helper column, how to remove duplicates with a single click, and how to use more advanced methods like Power Query deduplication for enterprise-scale datasets. Along the way, you will pick up tips for dealing with partial matches, case-sensitive duplicates, and duplicates that span multiple columns.

Beyond duplication removal, this guide also explores the flip side: sometimes you want to keep duplicates and instead find the unique values. Excel's UNIQUE function (available in Microsoft 365 and Excel 2021) makes this trivially easy, and we will show you how it compares to the older array-formula approaches used in Excel 2016 and 2019. Understanding when to remove versus when to isolate duplicates is a key decision point in any data workflow.

Whether you are preparing for an Excel certification exam, learning the software from scratch, or brushing up on skills you use every day, this article gives you a thorough, practical reference. We have structured it so beginners can follow the numbered steps and experienced users can jump directly to the advanced sections. By the end, managing duplicate cells in Excel will be second nature โ€” a reliable part of your data-cleaning arsenal that saves time and prevents errors across every project you touch.

Duplicate Data in Excel โ€” By the Numbers

๐Ÿ“Š
94%
Data Quality Issues
โฑ๏ธ
30%
Time Lost to Bad Data
๐Ÿ’ฐ
$15M
Avg. Annual Cost
๐Ÿ”„
3 sec
Remove Duplicates Speed
๐ŸŽฏ
5+
Built-In Methods
Test Your Knowledge of Duplicate Cells in Excel

How to Find and Remove Duplicate Cells in Excel

๐Ÿ“‹

Click the first cell of your data and drag to the last, or press Ctrl+Shift+End to select to the last used cell. Include column headers if you want Excel to treat them as labels during the Remove Duplicates process. Avoid selecting blank rows or columns outside your actual data table.

๐ŸŽจ

On the Home tab, click Conditional Formatting, then choose Highlight Cells Rules and select Duplicate Values. A dialog box appears where you can pick a highlight color โ€” default is light red fill with dark red text. This instantly colors every cell that appears more than once in your selection.

๐Ÿ”Ž

Scroll through your highlighted data and manually inspect flagged cells. Not every duplicate is an error โ€” sometimes repeated values are intentional, such as department codes or status flags. Decide which duplicates need to be removed and which should be retained before proceeding to deletion.

๐Ÿ—‘๏ธ

Go to the Data tab and click Remove Duplicates. A dialog lists all your columns with checkboxes. Select which columns should be considered when identifying duplicates โ€” checking all columns means only perfectly identical rows are removed. Click OK and Excel reports how many duplicates were deleted and how many unique rows remain.

โœ…

In a helper column, enter =COUNTIF($A$2:$A$100,A2) to count how many times each value appears. Any result greater than 1 confirms a duplicate. This formula-based method is non-destructive, meaning your original data stays intact while you audit the results before deciding on your next action.

๐Ÿ’พ

After removing duplicates, save a clean copy of the file with a new filename or version number. Document how many rows were removed and which columns were checked. This audit trail is essential for regulated industries and collaborative teams who need to track data transformations over time.

Conditional Formatting is the fastest way to visually identify duplicate cells in Excel without altering your data in any way. To use it, select the range you want to check โ€” this could be a single column like a list of email addresses, or a multi-column table where you are looking for fully repeated rows. Once your range is selected, navigate to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values. The dialog that opens lets you choose between highlighting duplicates or unique values, and you can customize the fill color and font color to suit your preference.

One important nuance of Conditional Formatting for duplicates is that it treats the entire selected range as a single pool. If you select two columns simultaneously, Excel looks for duplicates across both columns combined, not within each column separately. For example, if column A contains product codes and column B contains region names, selecting both and applying duplicate highlighting will flag any value that appears in either column more than once โ€” which is almost certainly not what you want. The best practice is to apply Conditional Formatting one column at a time unless you are intentionally searching across columns.

Another subtlety involves case sensitivity. Excel's built-in Conditional Formatting duplicate detection is not case-sensitive, so it treats "Apple", "apple", and "APPLE" as duplicates of each other. This is helpful for catching near-duplicates in names and email addresses, but it can produce false positives in datasets where case carries meaning โ€” such as product codes where "AB100" and "ab100" are intentionally different items. In those scenarios, you need a formula-based approach with the EXACT function.

For formula-based highlighting, you can use a custom Conditional Formatting rule driven by a COUNTIF formula. Select your range, then go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format. Enter a formula like =COUNTIF($A$1:$A$100,A1)>1 and set your desired format. This gives you the same visual output as the built-in Duplicate Values rule but with more control โ€” you can modify the COUNTIF criteria to look for values appearing three or more times, or combine it with other conditions using AND or OR logic.

Highlighting duplicates across multiple columns is a common requirement when you want to flag entire duplicate rows rather than individual cell values. The trick is to concatenate the values from all relevant columns into a helper column using a formula like =A2&"|"&B2&"|"&C2, then apply COUNTIF on that helper column. The pipe character between values prevents false matches where "AB" and "C" would otherwise match "A" and "BC". Once the helper column is in place, you can use Conditional Formatting on it to highlight or the Remove Duplicates tool to clean up.

When you want to keep only the first occurrence of each duplicate and delete all subsequent ones, Conditional Formatting alone is not sufficient โ€” it highlights all instances equally. You need to supplement it with sorting and filtering or use the Remove Duplicates tool, which always retains the topmost row when it encounters duplicates. If you need to keep the most recent occurrence instead of the first, sort your data by date descending before running Remove Duplicates so the newest entry floats to the top.

After applying Conditional Formatting to flag duplicates, you can use Excel's Filter feature to isolate them for bulk editing or deletion. Click the dropdown arrow on your header row, go to Filter by Color, and select the duplicate highlight color. This displays only the flagged rows, which you can then select en masse and delete by right-clicking and choosing Delete Row. Remember to clear the filter afterward so you can see the complete cleaned dataset and verify that the right rows were removed.

Free Excel Basic and Advance Questions and Answers
Test your Excel skills from beginner basics to advanced features with these practice questions.
Free Excel Formulas Questions and Answers
Practice Excel formula questions including SUM, IF, COUNTIF, and more to sharpen your skills.

VLOOKUP Excel and Formula Methods for Duplicate Detection

๐Ÿ“‹ COUNTIF Method

The COUNTIF function is the most widely used formula for detecting duplicates in Excel. Enter =COUNTIF($A$2:$A$100,A2) in a helper column next to your data, then drag it down to cover all rows. Any result greater than 1 means that value appears more than once in the range. You can then sort or filter by this helper column to group all duplicates together for review, making bulk decisions about which entries to keep or delete much more efficient.

To count duplicates across two columns simultaneously, use COUNTIFS instead: =COUNTIFS($A$2:$A$100,A2,$B$2:$B$100,B2). This formula only increments the count when both column A and column B match simultaneously, which is ideal for identifying duplicate records based on a combination of fields such as first name plus last name, or order ID plus product code. Values above 1 indicate a combined duplicate that likely represents data entry error rather than intentional repetition.

๐Ÿ“‹ VLOOKUP Excel for Cross-Sheet Duplicates

VLOOKUP Excel is exceptionally useful when you need to find duplicates across two separate sheets or tables. For example, if Sheet1 contains your master customer list and Sheet2 contains new sign-ups, you can use =IFERROR(VLOOKUP(A2,Sheet2!$A$2:$A$500,1,0),"New") in Sheet1 to flag which customers already exist in Sheet2. Any row that returns a value instead of "New" is a duplicate between the two datasets, enabling you to prevent double-importing records before merging tables.

A common pitfall with VLOOKUP for duplicate detection is forgetting to lock the lookup array with absolute references. If you drag the formula down without dollar signs on the array range, Excel shifts the range with each row, producing unpredictable results. Always write the lookup array as $A$2:$C$500 rather than A2:C500. Also note that VLOOKUP returns the first match it finds โ€” if you have multiple duplicates, it will not flag them all individually, which is a limitation compared to COUNTIF for true duplicate analysis.

๐Ÿ“‹ UNIQUE and EXACT Functions

Microsoft 365 and Excel 2021 users can leverage the UNIQUE function to extract a deduplicated list from any range in a single formula: =UNIQUE(A2:A100). This dynamic array formula spills results automatically into adjacent cells, creating a clean unique-values list without modifying the original data. You can combine it with SORT for an alphabetically ordered unique list: =SORT(UNIQUE(A2:A100)). This approach is non-destructive and updates automatically whenever the source data changes, making it ideal for dashboards and live reports.

For case-sensitive duplicate detection โ€” where "Excel" and "excel" must be treated as different values โ€” use the EXACT function inside a SUMPRODUCT formula: =SUMPRODUCT((EXACT($A$2:$A$100,A2))*1). This counts exact case-sensitive matches rather than the case-insensitive comparison that COUNTIF performs by default. If you need to create a drop down list in excel that shows only unique values for data validation, combining UNIQUE with a named range or direct array reference gives you a self-updating source list with zero manual maintenance.

Remove Duplicates Tool vs. Formula-Based Approach: Which Is Better?

Pros

  • Remove Duplicates completes in one click for datasets of any size
  • No formulas needed โ€” ideal for users unfamiliar with Excel functions
  • Built-in dialog lets you specify which columns define a duplicate row
  • Excel reports exact counts of deleted rows and retained unique rows
  • Works reliably on tables formatted as Excel Tables (Ctrl+T)
  • Faster than manual filtering for large datasets over 50,000 rows

Cons

  • Permanently deletes rows โ€” cannot undo after saving the file
  • Always keeps the first occurrence, with no option to keep the last
  • Does not distinguish between case-sensitive duplicates like AB and ab
  • Cannot flag duplicates without deleting them โ€” no preview-only mode
  • Ignores partial duplicates or near-matches requiring fuzzy logic
  • Does not work across multiple sheets simultaneously
Free Excel Functions Questions and Answers
Challenge yourself with Excel function questions covering VLOOKUP, INDEX, MATCH, and more.
Free Excel MCQ Questions and Answers
Practice multiple-choice Excel questions to prepare for certification exams and job interviews.

Duplicate Cell Management Checklist: Best Practices Before You Delete

Back up your workbook with Save As before running any duplicate removal operation.
Sort your data by the most relevant column so the preferred row floats to the top before removing duplicates.
Check whether duplicates are truly errors or intentional repeated entries like status codes or category tags.
Use COUNTIF in a helper column to preview how many duplicates exist before deleting anything.
Verify which columns should define uniqueness โ€” sometimes first name alone is not enough without last name.
Apply Conditional Formatting first to visually confirm which rows will be affected before deletion.
Remove blank rows and leading/trailing spaces with TRIM before running duplicate detection to avoid false misses.
Test your deduplication logic on a small sample of 20-30 rows before applying it to the full dataset.
Document the number of rows removed and the columns used to define uniqueness for your audit trail.
After removal, recheck with COUNTIF to confirm no duplicates remain and the row count matches expectations.
Hidden Spaces Cause Missed Duplicates

Excel treats "Chicago " (with a trailing space) and "Chicago" as completely different values during duplicate detection. Before running any deduplication method, add a helper column with =TRIM(A2) to strip all leading and trailing spaces, then copy-paste-values over your original column. This single step prevents the most common reason duplicate removal appears to fail โ€” invisible whitespace that makes identical entries look unique to Excel's comparison engine.

Power Query is Excel's most powerful tool for deduplicating large and complex datasets, and it is available in all versions of Excel from 2016 onward under the Data > Get & Transform Data section. Unlike the Remove Duplicates button, Power Query gives you a transparent, reproducible transformation pipeline that you can edit, refresh, and reapply whenever your source data changes. This makes it the preferred choice for recurring data imports, monthly report automation, and any workflow where the same cleaning process must be repeated consistently over time.

To use Power Query for duplicate removal, start by loading your data into the editor: click anywhere in your data table, then go to Data > From Table/Range. The Power Query editor opens with your data displayed in a preview pane.

To remove duplicate rows, right-click any column header and select Remove Duplicates โ€” or go to Home > Remove Rows > Remove Duplicates to deduplicate based on all columns simultaneously. If you want to deduplicate based on specific columns only, hold Ctrl and click multiple column headers before choosing Remove Duplicates, and Power Query will use only those columns as the uniqueness key.

One of Power Query's greatest advantages over the built-in Remove Duplicates tool is the Group By operation, which lets you deduplicate while simultaneously aggregating data. For example, if you have a sales dataset with duplicate customer rows representing multiple transactions, you can Group By customer ID while summing the sales amounts โ€” effectively deduplicating the customer list while preserving the total sales per customer. This kind of transformation is nearly impossible to achieve in one step with standard Excel tools but is trivially simple in Power Query's visual interface.

The UNIQUE function, introduced in Microsoft 365, represents a formula-based paradigm shift for duplicate management. Unlike the Remove Duplicates tool, UNIQUE is non-destructive โ€” it leaves the source data entirely intact and creates a separate deduplicated array in a new location. The basic syntax is =UNIQUE(array, [by_col], [exactly_once]). The optional exactly_once parameter, when set to TRUE, returns only values that appear exactly one time in the source range, effectively filtering out all duplicates and leaving only the genuinely unique entries. This is especially useful for finding items that were entered only once versus those with any repetition.

For Excel versions without the UNIQUE function, the classic approach involves an array formula using INDEX and MATCH with COUNTIF. The formula =IFERROR(INDEX($A$2:$A$100,MATCH(0,COUNTIF($C$1:C1,$A$2:$A$100),0)),"") entered as an array formula with Ctrl+Shift+Enter extracts unique values one by one into a column. This technique works in Excel 2016 and 2019 but requires careful setup and is error-prone for users unfamiliar with array formulas. Upgrading to Microsoft 365 solely for the UNIQUE function is justified if your work heavily involves data cleaning and deduplication.

Fuzzy duplicate matching is an advanced scenario where you need to find near-duplicates rather than exact ones โ€” for example, "John Smith" and "Jon Smith", or "123 Main St" and "123 Main Street". Excel does not have a built-in fuzzy match function, but Power Query's Fuzzy Merge feature (under Home > Merge Queries > Merge Queries with Fuzzy Matching) uses a similarity threshold to join records that are close but not identical.

The Similarity Threshold parameter ranges from 0 (match anything) to 1 (exact match only), and a value around 0.8 catches most common spelling variations and abbreviations without generating too many false positives.

For those who want to freeze a row in excel for reference while scrolling through deduplicated results, Excel's Freeze Panes feature (View > Freeze Panes > Freeze Top Row) keeps your header row visible as you scroll down through thousands of records. This is particularly helpful after deduplication when you need to review the cleaned dataset column by column to verify that the correct rows were retained. Combine it with alternating row colors via Table Formatting to make the cleaned data easier to audit visually at a glance.

Preventing duplicate data from entering your Excel workbooks in the first place is far more efficient than cleaning it up after the fact. The most effective prevention tool is Data Validation, which restricts what users can type into a cell.

To block duplicate entries in a column, select the range, go to Data > Data Validation > Settings, choose Custom from the Allow dropdown, and enter =COUNTIF($A$2:$A$100,A2)=1 as the formula. Excel will then reject any entry that already exists in the range and display a custom error message you define โ€” something like "This value already exists. Please enter a unique ID."

Learning how to create a drop down list in excel is another powerful prevention strategy. When users must select from a predefined list rather than type freely, the risk of duplicate variations โ€” like "New York" versus "New York City" versus "NYC" โ€” drops to near zero. Create your dropdown source list on a separate sheet, format it as a named range, then reference that name in the Data Validation dialog. Combined with the COUNTIF-based uniqueness rule above, dropdown lists enforce both consistency and uniqueness simultaneously, giving you clean data from the moment of entry.

Excel Tables (created with Ctrl+T) offer structural benefits for duplicate prevention in collaborative environments. When your data is stored as a formal Table, structured references automatically expand to cover new rows, so formulas like COUNTIF always cover the full dataset without manual range adjustments. You can also set up conditional formatting rules on a Table column that automatically apply to every new row added โ€” so duplicate highlighting is always active without any user intervention required after the initial setup.

Merging cells in excel, while visually appealing for headers and labels, is one of the most common sources of phantom duplicates. When cells are merged, Excel only stores the value in the top-left cell of the merged group and treats all other cells in the merge as empty.

If you later unmerge those cells to sort or filter, the empty cells can create rows that appear to duplicate the row with the actual value, confusing both users and formulas. Best practice is to avoid merging data cells entirely and instead use the Format Cells > Alignment > Center Across Selection option for a visually similar result that leaves each cell with its own value intact.

Regular data audits are essential for organizations where multiple people contribute to shared workbooks. Scheduling a monthly COUNTIF check on key identifier columns โ€” customer IDs, invoice numbers, SKUs โ€” takes less than five minutes and can catch duplicates before they propagate into reports and analytics. Consider creating a dedicated "Data Quality" sheet in your workbook with a dashboard of COUNTIF formulas monitoring all critical columns for duplicates. When a cell turns red due to Conditional Formatting on that dashboard sheet, it serves as an immediate visual alert that action is needed.

For teams that regularly export data from external systems like CRMs, ERPs, or databases into Excel, the source system itself is often the root cause of duplicates. Data exported from a CRM might include the same contact record twice if two sales representatives created separate entries for the same person. Before bringing that data into Excel, consider requesting a deduplicated export from the source system, or building a Power Query connection that applies deduplication as part of the import process so your workbook always starts with clean data regardless of the source quality.

Finally, documenting your deduplication rules in a comment or a dedicated notes cell is a habit that pays dividends in collaborative environments. Future users โ€” or your future self โ€” will not remember why certain columns were excluded from the uniqueness check, or why the 2023 data file has 200 fewer rows than the raw export.

A brief note explaining "Duplicates removed on 2026-07-30 based on columns A and C; 47 rows deleted" takes thirty seconds to write and can save hours of confusion during the next audit cycle. Data hygiene is not just about the technical steps โ€” it is about building a culture of transparency and accountability around data quality in your organization.

Practice Excel Formulas for Duplicate Detection

Mastering duplicate cell management in Excel ultimately comes down to choosing the right tool for the right situation. The Remove Duplicates button is your go-to for quick, one-time data cleaning when you are confident in the results and have a backup in hand. Conditional Formatting is best when you need a non-destructive visual audit that leaves all decisions in your hands.

COUNTIF and COUNTIFS formulas give you programmable, formula-driven control that integrates seamlessly into existing workbook logic. Power Query is the gold standard for large, recurring, or complex deduplication workflows. And the UNIQUE function is the fastest option in Microsoft 365 when you simply need a clean list without touching the source data.

Each of these methods improves in effectiveness when combined with good upstream data practices: consistent data entry formats, dropdown lists for standardized values, Data Validation rules that block duplicates at the point of entry, and regular audits of key identifier columns. The goal is to build a workbook environment where duplicates are prevented wherever possible and detected instantly when they do slip through โ€” rather than discovered weeks later when the damage has already propagated to downstream reports.

For users preparing for Microsoft Office Specialist (MOS) or other Excel certifications, duplicate management is a core competency that appears consistently in practice exams and real-world assessments. You should be comfortable demonstrating at least three methods for finding duplicates, explaining the tradeoffs between destructive and non-destructive approaches, and writing COUNTIF formulas from memory. Interviewers at data-heavy roles โ€” financial analysts, operations coordinators, data administrators โ€” frequently ask candidates to walk through how they would clean a dataset, and a confident, detailed answer about duplicate management immediately signals practical competence.

The broader context of data quality extends well beyond duplicates. Once you have mastered deduplication, natural next skills include standardizing inconsistent text values using TRIM, UPPER, LOWER, and PROPER; splitting concatenated fields with Text to Columns or the TEXTSPLIT function; filling missing values with default entries or interpolated estimates; and validating numeric ranges with Data Validation and IFERROR. Each skill builds on the others, and together they give you a complete data-cleaning toolkit that makes you a more valuable contributor to any team that relies on Excel for decision-making.

Staying current with Excel updates matters more than ever as Microsoft continues to add powerful new functions to Microsoft 365. The UNIQUE, FILTER, and SORT functions introduced in recent years have dramatically simplified what once required complex array formulas or VBA macros. Following Excel-focused blogs, YouTube channels, and community forums ensures you learn about these improvements as they arrive rather than years later. Practice is equally important โ€” the best way to internalize deduplication techniques is to apply them to real messy datasets, not just clean practice files where everything works on the first try.

If you regularly work with Excel data and want to validate your skills formally, exploring the Excel practice quizzes and certification resources available on PracticeTestGeeks.com is an excellent starting point. You will encounter questions that test your knowledge of COUNTIF syntax, Conditional Formatting rules, Power Query transformations, and more โ€” exactly the kinds of tasks you will face in real data-cleaning projects. Consistent practice with realistic questions builds both speed and confidence, so that when you sit down to clean a 50,000-row dataset, you know exactly which tool to reach for and how to use it without hesitation.

The skills you develop managing duplicate cells in Excel compound over time. A data analyst who can clean a dataset in fifteen minutes instead of two hours has more time for the analysis itself โ€” for building pivot tables, creating visualizations, running regressions, and generating the insights that actually drive decisions.

Deduplication is not glamorous work, but it is foundational work, and every hour you invest in mastering it returns many hours of saved effort across your career. Start with the methods in this guide, practice them on your own data, and build the habit of checking for duplicates as a standard first step in every data project you undertake.

Free Excel Questions and Answers
Comprehensive Excel practice test covering all skill levels for certification and job readiness.
Free Excel Trivia Questions and Answers
Fun and challenging Excel trivia questions to test your knowledge of features and shortcuts.

Excel Questions and Answers

How do I highlight duplicate cells in Excel?

Select your data range, then go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values. Choose a highlight color and click OK. Excel immediately colorizes every cell that appears more than once in the selected range. This method is non-destructive โ€” it only changes cell colors and does not delete any data, making it safe to use at any stage of your data review process.

What is the quickest way to remove duplicate rows in Excel?

Click anywhere in your data, go to the Data tab, and click Remove Duplicates. In the dialog box, check the columns that should define uniqueness and click OK. Excel removes all duplicate rows and reports how many were deleted. Always create a backup with Save As before using this tool, because the deletion is permanent once you save the file and cannot be recovered without a prior backup.

Can I find duplicates across two different Excel sheets?

Yes. Use a VLOOKUP or COUNTIF formula that references the other sheet. For example, =COUNTIF(Sheet2!$A$2:$A$500,A2) counts how many times the value in cell A2 appears in column A of Sheet2. Any result greater than zero indicates a duplicate between the two sheets. This technique lets you compare master lists against new imports before merging them, preventing double entries in your combined dataset.

Does Excel's duplicate detection work for case-sensitive matches?

The built-in Conditional Formatting and Remove Duplicates tools are not case-sensitive โ€” they treat 'Excel' and 'excel' as the same value. For case-sensitive duplicate detection, use a SUMPRODUCT formula with the EXACT function: =SUMPRODUCT((EXACT($A$2:$A$100,A2))*1). Any result above 1 indicates a case-sensitive duplicate. This formula-based approach works in all Excel versions and gives you precise control over the matching criteria.

How do I count the number of duplicates in a column?

Add a helper column with the formula =COUNTIF($A$2:$A$100,A2)-1 next to your data column. This formula counts how many additional copies of each value exist beyond the first occurrence. Sum the helper column with =SUM(B2:B100) to get the total number of duplicate entries in the dataset. Alternatively, after running Remove Duplicates, Excel shows you the duplicate count in the confirmation dialog automatically.

What is the UNIQUE function and how does it help with duplicates?

The UNIQUE function (available in Microsoft 365 and Excel 2021) returns a deduplicated list from a range without modifying the original data. The syntax is =UNIQUE(array). It spills results automatically into adjacent cells below the formula. The optional third argument, when set to TRUE, returns only values that appear exactly once, filtering out all duplicated entries. This is the fastest non-destructive deduplication method available in modern Excel versions.

How do I prevent users from entering duplicate values in Excel?

Use Data Validation with a custom COUNTIF formula. Select your input range, go to Data > Data Validation > Custom, and enter =COUNTIF($A$2:$A$100,A2)=1. Under the Error Alert tab, write a custom message that explains the duplicate restriction. Excel will block any entry that already exists in the range and display your error message, enforcing uniqueness at the point of data entry before duplicates can even be created in the workbook.

Can Power Query remove duplicates automatically on data refresh?

Yes. When you set up a Power Query transformation that includes a Remove Duplicates step, that step runs automatically every time you click Refresh in the Queries & Connections pane. This means you can import data from an external source โ€” a CSV file, database, or web query โ€” and Power Query will always deduplicate it as part of the load process. This is ideal for recurring reports where the source data may contain duplicates each time it is exported.

Why does Remove Duplicates seem to miss some duplicates?

The most common cause is invisible whitespace. A cell containing 'Chicago ' (with a trailing space) looks identical to 'Chicago' on screen but is a different value to Excel. Run =TRIM(A2) in a helper column and copy-paste-values over your original data before deduplicating. Other causes include inconsistent capitalization in case-sensitive scenarios, number-stored-as-text mismatches, and line breaks embedded in cells that make visually identical entries technically different to Excel's comparison logic.

How do I find duplicates based on multiple columns at once?

In the Remove Duplicates dialog, check all the columns you want included in the uniqueness definition โ€” Excel only removes rows where every checked column is identical. For formula-based detection, use COUNTIFS with multiple criteria ranges: =COUNTIFS($A$2:$A$100,A2,$B$2:$B$100,B2) counts rows where both column A and column B match simultaneously. You can also create a helper column concatenating all relevant columns and apply COUNTIF on that combined value for visual highlighting via Conditional Formatting.
โ–ถ Start Quiz