hi there,
This code deletes the entire row if a duplicate is found in column A. How can I change it so that instead of deleting the entire row it just writes x in the duplicate cell.
Thank you
This code deletes the entire row if a duplicate is found in column A. How can I change it so that instead of deleting the entire row it just writes x in the duplicate cell.
Thank you
Code:
'Check Column A for Duplicate values, if so delete entire row
LastRow1 = Range("A65536").End(xlUp).Row
For x = LastRow1 To 1 Step -1
If Application.WorksheetFunction.CountIf(Range("A1:A" & x), Range("A" & x)) > 1 Then
Range("A" & x).EntireRow.Delete
End If
Next x