S
Scott
I am trying to delete or clear out duplicate rows based on a few cells that
match. The cells other than those in the B, C & M columns may not match.
The below code works but runs very slowly (takes about 5 seconds per row).
Anyone know of a better (faster) way?
For RowIndex = 2 To 2000
If Range("B" + CStr(RowIndex)) = Range("B" + CStr(RowIndex + 1)) And _
Range("C" + CStr(RowIndex)) = Range("C" + CStr(RowIndex + 1)) And _
Range("M" + CStr(RowIndex)) = Range("M" + CStr(RowIndex + 1)) Then
Range("A" + CStr(RowIndex) + ":" + "Z" + CStr(RowIndex)) = ""
End If
Next
match. The cells other than those in the B, C & M columns may not match.
The below code works but runs very slowly (takes about 5 seconds per row).
Anyone know of a better (faster) way?
For RowIndex = 2 To 2000
If Range("B" + CStr(RowIndex)) = Range("B" + CStr(RowIndex + 1)) And _
Range("C" + CStr(RowIndex)) = Range("C" + CStr(RowIndex + 1)) And _
Range("M" + CStr(RowIndex)) = Range("M" + CStr(RowIndex + 1)) Then
Range("A" + CStr(RowIndex) + ":" + "Z" + CStr(RowIndex)) = ""
End If
Next