
Originally Posted by
anilsolipuram
Backup your workbook before trying this macro
try this macro and let me know
Sub macro()
Dim r, c As Range
Dim i, k As Variant
Range("b1:b88").Select
Set r = Selection
k = 88
For i = 1 To 88
If Range("b" & i).Value <> "" Then
temp = check_value(Range("b" & i).Value)
If temp = 1 Then
Range("b" & i).Select
Selection.Delete Shift:=xlUp
i = i - 1
k = k - 1
Else
End If
End If
Next
End Sub
Function check_value(val As Variant)
Range("a1").Select
Range("a1:a88").Select
On Error Resume Next
Selection.Find(What:=val, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Range(ActiveCell.Address).Select
Selection.Delete Shift:=xlUp
If Err.Description <> "" Then
check_value = 0
Else
check_value = 1
End If
End Function
Bookmarks