Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim lastRow As Long
- Dim i As Long
- Dim ws As Worksheet
- Dim txt As String
- Set ws = Sheets("Player List")
- Dim matchFoundIndex As Long
- Dim iCntr As Long
- lastRow = Range("A201").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
- Next
- For i = 2 To 201
- If ws.Range("B" & i).Value = "Duplicate" Then
- txt = "Duplicates found for" + " " + ws.Range("A" & i).Value + " " + "in" +
- ws.Range("L" & i).Value + vbNewLine
- End If
- Next i
- MsgBox txt
Add Comment
Please, Sign In to add comment