I have the following code to find and identify Duplicates.
is it possible to id. the other duplicate cell's address? Such as "Duplicate of cell $G$63" instead of just "Duplicate"
Code:
Dim last_Row_d As Long
last_Row_d = ws.Range("G" & Rows.count).End(xlUp).Row
Dim x As Long
For x = 5 To last_Row_d
If Application.WorksheetFunction.CountIf(ws.Range("G5:G1000"), ws.Range("G" & x)) > 1 Then
ws.Range("I" & x).Value = "Duplicate "
ws.Range("I" & x).Interior.Color = RGB(255, 255, 0) 'yellow
ws.Range("G" & x).Interior.Color = RGB(255, 255, 0) 'yellow
Else
ws.Range("I" & x).Value = ""
End If
Next x