4+ Methods to Filter Duplicate Values in Excel

Having duplicate values in a worksheet can lead to some inconveniences. It can take you a lot of time to find out the identical values manually. Microsoft Excel has great tools to find duplicate values in various ways. After that, the duplicates can be removed to clean up the dataset. I am going to show you 4+ easy methods to filter duplicate values in Excel.

Let me introduce you to the datasheet used throughout this article. The dataset I have used for showing the methods has 4 columns about some of the best music albums, artist names, years, and their sales records.

Introduction to the Dataset: Filter Duplicate Values in Excel

Filter Duplicate Values in Excel with Remove Duplicates Command

The quickest and easiest way to filter out the duplicate values from a dataset is to use the Remove Duplicates command.

So, use Remove Duplicates command to filter duplicate values, follow these steps:

  1. Select the entire data table.
    Dataset to find duplicate values in Excel with Remove Duplicates command
  2. Click on the Data tab from the ribbon.
  3. Then, select the Remove Duplicates command from the Data Tools group.
    Usage of Romove Duplicates command to filter duplicates in Excel
    The Remove Duplicates dialog box will show up on the screen.
  4. Make sure all the Column boxes are selected. Also, check the tick mark on My data has headers box.
    Remove duplicates dialog box: Filter Duplicate Values in Excel
  5. Hit OK to take away all the similar values.
    Selecting columns in the Remove Duplicates dialog box

A window will show up to display short description of number of values are erased and kept.

Excel message to show the number of values removed and kept

After clicking OK, you will see the filtered duplicates with Remove Duplicates command.

Filtered Duplicate with Duplicate Values command in Excel

Filter Duplicate Values in Excel Using Advanced Option

Another way to filter the duplicates is using the Advanced Filter. The Advanced Filter can filter out data on different criteria. Now, to do that, go through the procedure:

  1. Select a particular range of values that you want to filter.
    I am choosing the Artist and Year columns for that.
    Dataset to filter duplicates with Advanced filter option in Excel
  2. Click on the Data tab from the ribbon.
  3. Under the Sort & Filter group, hit the Advanced option.
    Usage of ADVANCED FILTER to Filter Duplicate Values in Excel
    You will see the Advanced Filter Dialog box will appear.
    Advanced Filter Dialog box : Filter duplicate values in Excel
  4. Choose either Filter the list, in-place, or Copy to another location as an Action type. I have chosen the Filter the list, in-place.
  5. Keep the Criteria range empty.
  6. The Copy to box will seem default if you choose the Filter the list, in-place option. But you have to fill up the Copy to box if you choose the Copy to another location option.
  7. Give a tick mark on the Unique record only check box and hit OK.

Selecting actions and unique records in the Advanced Filter dialog box

Now, you will see the filtered duplicate with Advanced filter option.

Final Result: Use ADVANCED FILTER to Filter Duplicate Values in Excel

Even if I chose two columns, you can see the duplicate valued rows are gone now. It’s because my selected columns contained repeated values. So, the whole dataset had to filter out.



Filter Duplicate Values in Excel Applying Pivot Table

Pivot Table is sort of an analytics tool to count the number of items. First, I am going to show you using Pivot Table to find duplicate values for a single-column dataset. And then, I will show the instruction steps for a multiple-column dataset. Here is one-columned table for company’s sales records.

Dataset of single columned data to apply Pivot Table in Excel

Pivot Table for Single Column Dataset in Excel

Now, follow these steps to apply Pivot Table in Excel:

  1. Go to Insert tab from the ribbon.
  2. Under the Tables group, select the PivotTable drop-down menu.
  3. Click on From Table/Range command.
    Use PIVOT TABLE to Filter Duplicate Values in Excel
    A dialog box named PivotTable from table or range will pop up.
    PivotTable from table or range dialog box
  4. Click on Column A to select the range.
    Confirm range and location in the Pivot table or range
  5. Choose the Existing Worksheet option.
  6. Select a suitable spare cell for the Pivot Table’s Location and click on it and hit OK.
    Pivot Table dialog box: Filter Duplicate Values in Excel
    PivotTable Fields pane will come up on the right side of your worksheet.
    Pivot Table Fields: Apply PIVOT TABLE to Filter Duplicate Values in ExcelMarking the Sales column will automatically shift in the Rows section. I have dragged the Sales in the Values section.

Sales fields to move it to the Values area in the PivotTable Fields pane

The Values command will add the total numbers of identical values.

Displaying Values area in Pivot Table Fields pane in Excel

All the repeated values are gone now in a separate table with the cell repetition counts.

Created Pivot Table to find duplicate values for single columned dataset in Excel



Pivot Table for Multiple Column Dataset in Excel

To insert Pivot Table for multiple column dataset in Excel, go through the steps below:

  1. Select the entire data table.
  2. Click on the Insert tab.
  3. Under the Tables group, select the PivotTable command.
    Pivot Table Location: Filter Duplicate Values in Excel
    A dialog box named PivotTable from table or range will pop up.
  4. Choose the Existing worksheet point from Choose where you want the Pivot Table to be placed bar.
  5. Click on the Locations bar, and now select an empty cell beside the table.
    Confirmed the location to place Pivot Table of multiple columned dataset
  6. Press OK from the box.
    The PivotTable Fields window will come up on the right side of your worksheet.
  7. Mark all the checkboxes (Album, Artist, Year, Sales) to add them inside the Rows section.
  8. Drag the checkboxes inside the Values section one by one from above.
    PivotTable Fields pane to organize the Pivot Table
  9. Now hit the Design tab.
  10. Under the Layout group, click on the Report Layout drop-down.
  11. Select “Show in Tabular Form, and “Repeat All Item Labelscommand.
    Accessing the Report Layout tool from Design tab for multiple columned dataset
  12. Under the Layout group, hit the Subtotals drop-down menu.
  13. Select the Do Not Show Subtotals command.

Accessing the Subtotals dropdown not to show subtotals in Excel

The Pivot Table can filter out the duplicate values from both the single-column data table and the multiple-columned data tables. It will show the results in a separate table.

Pivot Table outcome: Filter Duplicate Values in Excel



Filter Duplicate Values in Excel with Power Query Editor

Power Query is known for transforming data differently. Power Query Editor can also do the work of filtering and erasing identical values.

Here are the steps to filter duplicate values in Excel:

  1. Select the entire data table (CTRL+A).

    Dataset to filter duplicate values with Power Query Editor in Excel

  2. Click on the Data tab from the ribbon.
  3. Under the Get & Transform group, hit the From Table option.
    Usage of Power Query to Filter Duplicate Values in Excel
    The Create Table dialog box will come along on the screen. As I have already selected the cell range, so ‘Where is the data for your table?’ box is filled up already.
    Remember to tick mark the My data has headers box.
  4. Hit OK.
    Create Table dialog box to convert data range into table
    The Power Query Editor window will show up.
  5. Take the mouse cursor on a column header and select it.
    The selected column will turn green color.
  6. Put the cursor on the column header (Album) again and right-click on it.
  7. Select Remove Duplicates.
    Filter Duplicate Values in Excel Using Power Query
    Now, the identical data are gone from the table.
    Power Query Editor to d
  8. Close the Power Query Editor window. Click on Keep in the window.
    Selecting Keep option to keep the changes in the Power Query Editor
  9. Click on the small icon on the top-left corner of the table in the Power Query Editor window.
    Clicked on the icon locating upper left corner to remove duplicates
  10. Select Remove Duplicates.
    Chose Remove Duplicates in Excel
    If you want to keep only the identical values from the table, you can choose the Keep Duplicates option from the drop-down list.

You will see the resulting table has no similar values now and got a new decorative Cell Style automatically. You can change the cell colors later if you like.

Result after using Power Query to filter duplicate values in Excel

Note: You may have noticed the Table.Distinct function when you entered the Power Query Editor window. So, you can filter out the duplicates by applying the Table.Distinct function straight away. But personally, I prefer the followed steps I showed you above.

Displaying the Power Query Editor after removing duplicate in Excel

Filter Duplicate Values with CONCATENATE & COUNTIFS Functions

You will need two additional columns to use the CONCATENATE function and COUNTIFS functions to extract the unique values from a list.

I am going to put together only two columns in the formula. Two columns are enough to be assured of the similarities of values. But you can compile all the columns in the formula if you wish. In this method, I will be using the CONCATENATE and COUNTIFS functions.

Use CONCATENATE Function to Add Texts in Excel

CONCATENATE function is a tool allowing users to combine multiple pieces of text into a single cell.

Syntax

=CONCATENATE(text1, text2, …)

Formula

=CONCATENATE(B2&C2)

Formula Breakdown

  • B2 is the lookup value which is the top cell of the column Artist.
  • C2 is the lookup value which is the top cell of the column Year.

To use the CONCATENATE function to add data of Artist and Year columns, go through these steps below:

  1. Insert two new columns beside the data table.
    I named the columns Artist & Year and Counts.
    Inserted two columns to store the data to filter duplicate values in Excel
  2. Then, copy the following formula in the top cell E2: =CONCATENATE(B2&C2)
    CONCATENATE function: Filter Duplicate Values in Excel
  3. Press ENTER.
  4. Now, take the cursor to the bottom-right corner of cell E2. The Fill Handle icon will appear.
    Using Fill Handle to drag down the formula with CONCATENATE & COUNTIFS functions
  5. Double-click on the icon to copy the formula up to cell E14.

Apply COUNTIFS Functions to Count Texts in Excel

COUNTIFS provides a powerful solution by enabling users to specify multiple conditions for counting.

Syntax

=COUNTIFS(criteria_range1, criteria1, [criteria_range2, …)

Formula

=COUNTIFS(E2:E14,E2)

Formula Breakdown

  • E2:E14 is the selected range of cells.
  • E2 is the criteria cell.

To apply COUNTIFS to count the concatenated text, go through the procedure:

  1. Select a the top cell (F2) of column F.
  2. Copy and paste the formula in the selected cell: =COUNTIFS(E2:E14,E2)
    COUNTIFS Function: Filter Duplicate Values in Excel
  3. Press ENTER.
  4. Use the Fill Handle icon to copy the formula up to cell F14.
    Displaying counts of concatenated texts in Excel
  5. Click on the Data tab.
  6. Under the Sort & Filter group, click on the Filter command.
    Use Filter command to Filter duplicate values in Excel
    A small arrow, Filter drop-down icon, will come along beside all the headers.
  7. Click on the Filter drop-down icon of the Counts header (F1).
    You will see all the checkboxes of values are selected.
  8. Unmark the box of value:2.
    Unmarked the value: 2 in the dropdown menu of Excel data table
  9. Hit OK.

Removing all the cells having value:2 has erased the duplicate cells. Having a value of 1 means, they are all unique values.

Output: Filter duplicate values in Excel



Conclusion

I have discussed all the easy ways to find duplicate values in Excel. I think now you can smoothly filter out the identical values and remove them. Feel free to share your comments about this article. Also, check our other articles to learn more about Microsoft Excel.

Frequently Asked Questions

What is the filter function in Excel?

In Excel, the FILTER function is a powerful tool that allows users to extract and display data based on specific criteria. It enables dynamic filtering of a range or array, returning only the rows that meet the specified conditions. The FILTER function employs a structured syntax, with parameters for the array or range to filter, as well as the criteria to apply. By using FILTER, users can quickly isolate and analyze data subsets, streamlining data manipulation and enhancing spreadsheet efficiency.

How do I fix duplicate numbers?

To fix duplicate numbers in Excel:

  1. Select the column or range containing the duplicate numbers.
  2. Go to the Data tab on the ribbon.
  3. Click on Remove Duplicates in the Data Tools group.
  4. In the Remove Duplicates dialog box, uncheck any columns where you want to preserve duplicates.
  5. Click OK to remove duplicate numbers.

This process automatically identifies and removes duplicate values, leaving you with a cleaned dataset. Adjust options based on your specific needs, and ensure you have a backup or confirm the data meets your requirements after removal.

How do you avoid duplicate values?

To avoid duplicate values in Excel:

  1. Use Data Validation: Validation by selecting the desired range, navigating to the Data tab, and choosing Data Validation. Opt for Custom from the Allow dropdown and input the formula =COUNTIF($A$1:$A$100, A1)=1
    (adjusting the range as necessary)
  2. Conditional Formatting for Duplicates: Employ Conditional Formatting for Duplicates by selecting the range, going to the Home tab, and choosing Conditional Formatting. Opt for Highlight Cells Rules and then Duplicate Values, adjusting formatting preferences and confirming with OK.
  3. Remove Duplicates: Use the Remove Duplicates feature by selecting the range, heading to the Data tab, and clicking Remove Duplicates. Choose the relevant columns and confirm with OK.

By implementing these steps, you can enforce uniqueness in your data, preventing the entry or identification of duplicate values. Adjust the range and criteria based on your specific needs.

Rate this post

Leave a Reply

Your email address will not be published. Required fields are marked *