How to remove duplicates that are case sensitive in Excel?
Normally, the Remove Duplicates feature in Excel can help you remove the duplicate values quickly and easily, however, this feature is not case sensitive. Sometimes, you want to remove duplicates that are case sensitive to get the following result, how could deal with this task in Excel?
The following formula may help you to remove the case sensitive duplicate values and keep the first, please do as follows:
1. Enter this formula =IF(SUMPRODUCT(--EXACT(A2,$C$1:C1)),"",A2) into a blank cell, where you want to put the result, C2, for example, see screenshot:
Note: In the above formula, A2 is the first cell of the list excluding header that you want to use, and C1 is the cell above the cell that you put the formula.
2. Then drag the fill handle down to the cells that you want to apply this formula, and the duplicate values but the first that are case sensitive have been replaced with blank cells. See screenshot
If you want to remove all duplicates that are case sensitive, you can apply a helper formula column, do as follows:
1. Enter the following formula into adjacent cell of your data,B2, for instance, =AND(A2<>"",SUMPRODUCT(--(EXACT(A2,$A$2:$A$15)))>1), see screenshot:
Note: In the above formula, A2 is the first cell of the data range excluding header, and A2:A15 is the used column range that you want to remove the duplicates case sensitive.
2. Then drag the fill handle down to the cells that you want to contain this formula, and all the duplicates are displayed as TRUE, and unique values are displayed as FALSE in the helper column, see screenshot:
3. And then you can filter all the duplicate values based on the helper column. Select the helper column, then click Data > Filter to activate the filter function, and click the triangle button at the right corner of cell B1, check only TRUE option in the list box, see screenshot:
4. Then click OK, only the duplicate values that are case sensitive have been filtered out, select the filtered data, then click Home > Delete > Delete Sheet Rows, see screenshot:
5. And all the rows of duplicate values that are case sensitive have been deleted at once, then you should cancel the Filter function to show the unique values, see screenshot:
6. At last, you can delete the cell contents of column B as you need.
Tips: If you want to keep the original data, you can copy the filtered data and pasted them to another location instead of removing them.
If you have Kutools for Excel, with its Select Duplicate & Unique Cells utility, you can quickly select or highlight the duplicate values that are case sensitive and then remove them at once.
|Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.|
After installing Kutools for Excel, please do as follows:
1. Select the data range that you want to remove the case sensitive duplicates.
2. Then click Kutools > Select > Select Duplicate & Unique Cells, see screenshot:
3. In the Select Duplicate & Unique Cells dialog box, select Duplicates (Except 1 st one) or All duplicates (Including 1 st one) you need, and then check Case sensitive option, see screenshot:
4. Then click Ok button:
(1.) If you choose Duplicates (Except 1 st one) option, the duplicate values excluding the first record will be selected and then press Delete key to remove them at once, see screenshot:
(2.) If you choose All duplicates (Including 1 st one) option, all duplicates that are case sensitive are selected, and then press Delete key to remove them at once, see screenshot: