How to find and count duplicate cells/values in a single row in Excel?
Normally Conditional Formatting feature can help Excel users easily find out all duplicates in columns. But how to find duplicate cells/values in rows? This article is talking about finding duplicate cells/values in a single row, and counting number of duplicates in a single row as well in Excel.
Recommended Excel Productivity Tools
Actually we can also find duplicate cells or duplicate values in a single row or in each row with Conditional Formatting feature. Please do as follow steps:
1. Select the range that you will find duplicate cells in each row, and click Home > Conditional Formatting > New Rule.
2. In the opening Edit Formatting Rule dialog box, please:
(1) Click to select Use a formula to determine which cells to format in the Select a Rule Type box;
(2) In the Format values where this formula is true box, please enter the formula =AND(ISNUMBER(A1), COUNTIF(1:1,A1)>1).
Note: In above formula, A1 is the first cell of selected range, and 1:1 is the first row of selected range.
(3) Click the Format button.
3. In the opening Format Cells dialog box, please specify the cell formatting as you need, and click the OK button.
In our case, we go to the Fill tab and select a background color in the Background Color section as below screenshot shown:
4. Click the OK button in the Edit Formatting Rule dialog box.
Now you will see all duplicate values/cells are highlighted with specified color in each row. See screenshot:
The second method will introduce Select Duplicate & Unique Cells utility of Kutools for Excel to find and count duplicate cells/rows in a single row in Excel. Please do as follows:
Kutools for Excel - Combines more than 300 Advanced Functions and Tools for Microsoft Excel
1. Copy the single row that you will find and count duplicates, and then right click a blank cell and select Transpose (T) in the Paste Options section to transpose row to column. See screenshot:
Note: You can’t find out the Transpose (T) in the right-clicking menu in Excel 2007 directly. However, you can click Home > Paste > Transpose to get it. And this way works in all Excel 2007/2010/2013. See above screenshot:
2. Now the row is converted to a list/column, go ahead to click Kutools > Select > Select Duplicate & Unique Cells.
3. In the opening Select Duplicate & Unique Cells dialog box, check Duplicates (Except 1st one) option or All duplicates (Including 1st one) option as you need, and click the Ok button.
Note: It’s optional to check the Fill backcolor option. This Fill backcolor option will highlight all found duplicate cells with specified color.
3. Now a dialog box comes out and shows how many duplicates have been found as below screen shot shown. Click the OK button to close it.
The Select Duplicate & Unique Cells utility of Kutools for Excel is designed to find out all duplicates in selected column/list, and highlight all found duplicate cells or rows as well.