• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Identifying duplicate rows of values?

sushmak

New Member
I have an Excel file with 300 columns and 1000 Rows of data. I need to identify which rows have duplicate data, meaning rows with the same information in all 300 columns.
I have used COUNTIFS but that only gives one set of duplicates. The data has multiple duplicate rows that I need to identify . I've attached a sample table e.g. Job 1 and 4 are dupe rows and Jobs 3,5,6 are also dupe rows. Thank you so much

Value 1 Value 2 Value 3 Value 4 Value 5 Value 6 Value 7 Value 8
Job 1 A B C D E F G H
Job 2 A B C
Job 3 D E F G H
Job 4 A B C D E F G H
Job 5 D E F G H
Job 6 D E F G H
 
Hi ,

What kind of data is present in the 300 columns ? Is it numeric alone , or alpha alone or a mix of both ?

Narayan
 
sushmak
One possible...
Copy this to Your sheets code page and run it.
if duplicate then A-column cell will be yellow and
You can find info from 310's column.
Code:
Sub Show_DRows()
    Application.ScreenUpdating = False
    With ActiveSheet
        y_max = 1000
        For y = 1 To y_max - 1
            Dim datas(300)
            .Cells(y, 310) = Empty
            .Cells(y, 1).Interior.ColorIndex = xlNone
            For x = 1 To 300
                datas(x) = .Cells(y, x)
            Next x
            For yy = y + 1 To y_max
                DR = True
                For x = 1 To 300
                    If datas(x) <> .Cells(yy, x) Then
                        DR = False
                        x = 301
                    End If
                Next x
                If DR Then
                    tmp = .Cells(y, 310)
                    If tmp <> Empty Then tmp = tmp & ", "
                    tmp = tmp & y & "=" & yy
                    .Cells(y, 310) = tmp
                    .Cells(y, 1).Interior.ColorIndex = 6
                End If
            Next yy
        Next y
    End With
    Application.ScreenUpdating = True
End Sub
 
Hi Narayank991, the data is alphanumeric.
Thank you so much @vletm, will try this for sure.
I'm a basic user so I'm looking forward to learning more in this forum.
 
Back
Top