Hello everyone,
I need to identify the last row of each duplicate set that exists in a spreadsheet. The other duplicates of the set will be sent to a worksheet called Duplicate while the last duplicate of the set is retained. However, the use wants to be able to identify which rows in the original spreadsheet are members of duplicate sets. Here is the code
I need to identify the last row of each duplicate set that exists in a spreadsheet. The other duplicates of the set will be sent to a worksheet called Duplicate while the last duplicate of the set is retained. However, the use wants to be able to identify which rows in the original spreadsheet are members of duplicate sets. Here is the code
Code:
For intRowCount = 1 To intTotalRows
If (Cells(intRowCount, 10).Value = "Duplicate") Then
If Not Cells(intRowCount + 1, 11) = Cells (intRowCount, 11) Then
Cells(intRowCount, 10).Value = "OkDup"
x = x + 1
End If
End If
Next intRowCount
MsgBox "X Counter is " & x
[code]
I using the variable X in order to track the number of last duplicates I've found. It is only for test purposes. When I run the code, the resultant value of X is zero.