Hi DILIPandey,
Sorry to bother again. The following is a code that you developed to help me replacing the repeated data with "same as above". Most of the time, it works very well. However, sometimes it creates "False Positive" results, replacing values that were not equal. Could you please help me explain why that happens. Thanks in advance.
Best regards,
Matt
PHP Code:
Sub DILIPandey()
'checking duplicates
i = Range("l" & Rows.Count).End(xlUp).Row
k = 0
Range("l" & i, "P" & i).Select
For n = 1 To i - 1
For Each cell In Selection
If cell = cell.Offset(-1, 0) Then
k = k + 1
End If
If k = 5 Then
Selection.Value = "same as above"
k = 0
End If
Next
Selection.Offset(-1, 0).Select
Next
End Sub
Bookmarks