Guest User

Untitled

a guest
Oct 17th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. Dim lastRow As Long
  2. Dim i As Long
  3. Dim ws As Worksheet
  4. Dim txt As String
  5. Set ws = Sheets("Player List")
  6. Dim matchFoundIndex As Long
  7. Dim iCntr As Long
  8. lastRow = Range("A201").End(xlUp).Row
  9. For iCntr = 1 To lastRow
  10. If Cells(iCntr, 1) <> "" Then
  11. matchFoundIndex = WorksheetFunction.Match(Cells(iCntr, 1), Range("A1:A" &
  12. lastRow), 0)
  13. If iCntr <> matchFoundIndex Then
  14. Cells(iCntr, 2) = "Duplicate"
  15. End If
  16. End If
  17. Next
  18.  
  19. For i = 2 To 201
  20. If ws.Range("B" & i).Value = "Duplicate" Then
  21. txt = "Duplicates found for" + " " + ws.Range("A" & i).Value + " " + "in" +
  22. ws.Range("L" & i).Value + vbNewLine
  23. End If
  24. Next i
  25. MsgBox txt
Add Comment
Please, Sign In to add comment