Hi guys, I have this macro provided to me by royUK. I've modified this code abit in such a way that it will check for all duplicated values in Column B and display the word "Duplicated" in the corresponding Cloumn C.
Sub check_Duplicate() Dim rLook As Range Dim rFind As Range Dim sAdr As String Sheets("CALCULAT").Activate lRow = Cells(Rows.Count, "B").End(xlUp).Row For iRow = 1 To Cells(Rows.Count, "B").End(xlUp).Row - 1 With Cells(iRow, "B") If .Value <> "S" Then Set rLook = Range(.Offset(1), Cells(lRow, "B")) Set rFind = rLook.Find(What:=.Value, _ LookIn:=xlValues, LookAt:=xlWhole, _ MatchCase:=False, MatchByte:=False, _ After:=Cells(lRow, "B")) If Not rFind Is Nothing Then sAdr = rFind.Address Do If rFind.Offset(, 1).Value = .Offset(, 1).Value Then .Offset(, 1).Value = "Duplicated" rFind.Offset(, 1).Value = "Duplicated" End If Set rFind = rLook.FindNext(rFind) Loop While rFind.Address <> sAdr End If End If End With Next iRowEnd Sub
But now i need to modify the code again so that it will delete duplicated values in Column B instead. I'm not sure how. Tried afew ways but didn't work out. Any help here would be greatly appreciated.
Thanks guys.