johnbird1988
Board Regular
- Joined
- Oct 6, 2009
- Messages
- 199
Hello,
I am trying to preform a duplicate row check on a data set spanning over 6 columns and approx. 250,000 rows of data.
What I am trying to find is the more efficient way to highlight any duplicate rows. The code I have at the moment currently take around 45 minutes plus and I can’t help think there is a more efficient way.
I have added below an extract of my current code for the duplicate check. In column G I have added a concatenated for A:F. This column is then removed at the end of the code.
Any help would be great thank you,
John
I am trying to preform a duplicate row check on a data set spanning over 6 columns and approx. 250,000 rows of data.
What I am trying to find is the more efficient way to highlight any duplicate rows. The code I have at the moment currently take around 45 minutes plus and I can’t help think there is a more efficient way.
I have added below an extract of my current code for the duplicate check. In column G I have added a concatenated for A:F. This column is then removed at the end of the code.
Code:
For Each w In .Range("G2:G" & iRow)
If Application.CountIf(.Range("G2:G" & iRow), w.value) > 1 Then
w.Interior.Color = RGB(255, 199, 206)
w.Font.Color = RGB(156, 0, 6)
End If
Next w
Any help would be great thank you,
John