How to Check DUPLICATE Rows

NEW_2VBA

Board Regular
Joined
Dec 15, 2015
Messages
106
Is there a macro or other Excel resource I can use to check for duplicate values entered in a row?

Each row contains about 15 cells so I need to know if there are any instances of all 15 cells being identical.

Some information will be duplicated however we're trying to identify the line entries that are exactly alike in all 15 cells within a spreadsheet containing sometimes over 5K+ rows of data. Thanks! Here's a condensed example:
InvoiceDateJobNameDescriptionAmount
1456A4/11/18AnalystJohn DoeProfessional Services$800
1456A4/11/18AnalystJohn DoeProfessional Services$800

<tbody>
</tbody>
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
What do you want to do with the duplicate entries?
 
Upvote 0
Ok, how about
Code:
Sub FindDuplicateRows()

   Dim Cl As Range
   Dim ValU As String
   
   With CreateObject("scripting.dictionary")
      For Each Cl In Range("A2", Range("A" & Rows.count).End(xlUp))
         ValU = Join(Application.Transpose(Application.Transpose(Cl.Resize(, 15).Value)), "|")
         If Not .exists(ValU) Then
            .Add ValU, Cl
         Else
            Cl.Resize(, 15).Interior.Color = 45678
            .Item(ValU).Resize(, 15).Interior.Color = 45678
         End If
      Next Cl
   End With
End Sub
 
Upvote 0
It worked like a charm!! THANK YOU!! Is it possible to highlight orange?
 
Last edited:
Upvote 0
Change the color to 49407
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0
Is there a macro or other Excel resource I can use to check for duplicate values entered in a row?

Each row contains about 15 cells so I need to know if there are any instances of all 15 cells being identical.

Some information will be duplicated however we're trying to identify the line entries that are exactly alike in all 15 cells within a spreadsheet containing sometimes over 5K+ rows of data. Thanks! Here's a condensed example:

Hi!

Try the formula below too in Coditional Formatting:

=SUM(--(MMULT(--($A2:$F2=$A$2:$F$10),TRANSPOSE(COLUMN($A1:$F1)/COLUMN($A1:$F1)))=COLUMNS($A1:$F1)))>1

Markmzz
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,509
Members
448,967
Latest member
screechyboy79

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top