How to Show/Keep Only Duplicate Values in Excel

Suppose we have one list of some fruits, and some of them are duplicate. If we want to only keep duplicate fruits and remove the unique ones, how can we do? This article will introduce you two methods to only keep duplicate values from a list in excel. The first method, you can use Conditional Formatting function in excel; the second one, you can use formulas with Filter function to keep duplicate values.


Prepare a list A. It contains some duplicate values. We want to keep these duplicate values and remove the others.

ShowKeep Only Duplicate Values 1

Method 1: Keep Duplicate Values by Conditional Formatting

Step 1: Select List A.

Step 2: Click Home in ribbon, click Conditional Formatting in Styles group.

ShowKeep Only Duplicate Values 2

Step 3: In Conditional Formatting dropdown list, select Highlight Cells Rules->Duplicate Values.

ShowKeep Only Duplicate Values 3

Step 4: In Duplicate Values dialog, select Duplicate in dropdown list. Keep default value in values with dropdown list. Then click OK.

ShowKeep Only Duplicate Values 4

Step 5: Verify that all duplicate values are marked with dark red properly.

ShowKeep Only Duplicate Values 5

Step 6: Select A1, click Data in ribbon, then click Filter in Sort & Filter group.

ShowKeep Only Duplicate Values 6

Step 7: Click on filter arrow on A1 to load filter settings. Click Filter by Color, under Filter by Cell Color select cell with color.

ShowKeep Only Duplicate Values 7

Verify that all duplicate values are filtered.

ShowKeep Only Duplicate Values 8

Step 8: Now we just need to copy these values to new column. Select these cells, press F5, click Special on Go To dialog.

ShowKeep Only Duplicate Values 9

Check on Visible cells only, then click OK.

ShowKeep Only Duplicate Values 10

Verify that duplicate values are auto activated after above step.

ShowKeep Only Duplicate Values 11

Copy and paste them in column B. Clear filter to expand the list. Delete column A. Then only duplicate values are kept.

ShowKeep Only Duplicate Values 12

Method 2: Extract Duplicate Values by Formulas

Step 1: In B2 enter the formula =COUNTIFS($A$2:$A$14,$A2)>1. We get TRUE.

ShowKeep Only Duplicate Values 13

Step 2: Drag the fill handle down. Verify that B2:B14 are filled with TRUE or FALSE.

ShowKeep Only Duplicate Values 14

Step 3: In B1, click Data tab in ribbon, and click Filter to create a filter. In filter, only check on TRUE, then click OK.

ShowKeep Only Duplicate Values 15

Step 4: Verify that only duplicate values are shown.

ShowKeep Only Duplicate Values 16

Step 5: Repeat step#8 in method 1. Then only duplicate values are kept.

Video: Excel – How to Filter Duplicate Values


Below are sample files in Microsoft Excel that you can download for reference if you wish.

Related Posts

Match Single Criteria in Excel

No repeat statistic based on a single condition is used wildly in daily work, for example, count type of products, the duplicate types are not encountered. This article describes the way of no repeats statistics for data in a single ...

Excel Array Construction

This article will talk about how to create one-dimensional array or two-dimensional array by using some functions in Excel. When using array formulas in Excel, we often use functions to construct arrays. Generate Array with ROW or COLUMN Functions Array ...

Excel Array Operation

We have all heard of arrays. Depending on the dimensionality, they are divided into one-dimensional arrays and two-dimensional arrays. Depending on the data type, they can also be divided into numeric arrays, logical arrays, and so on. The concatenation and ...

Excel Array Matrix Operation

In Excel, we have a built-in function used to perform matrix operations. It is the MMULT function. This function accepts two arrays as parameters and returns the product of the two arrays. However, this function has a prerequisite that the ...

A1 Reference Style and R1C2 Reference in Excel

In Excel, there are two reference styles. A1 reference style and R1C2 reference style. These two reference styles can help us find the cell by the cell address. Some functions return these two addresses through the argument settings. A1 Reference ...