Sir, I tried a small macro but unable to get the result. I have a data file with numbers in a column in which some numbers are duplicated. I need the result column to identify the duplicates and display them with that number and text as duplicate. Given the data file below.
INPUT
1
2
3
1
4
5
6
7
8
4
7
9
8
10
11
8
RESULT
1 duplicate
1 duplicate
4 duplicate
7 duplicate
8 duplicate
4 duplicate
7 duplicate
8 duplicate
8 duplicate
-------------------
Sub TEST()
Dim lastRow As Long
Dim matchFoundIndex As Long
Dim iCntr As Long
lastRow = Range("A65000").End(xlUp).Row
For iCntr = 1 To lastRow
If Cells(iCntr, 1) <> "" Then
matchFoundIndex = WorksheetFunction.Match(Cells(iCntr, 1), Range("A1:A" & lastRow), 0)
If iCntr <> matchFoundIndex Then
Cells(iCntr, 2) = "Duplicate"
End If
End If
Bookmarks