Hi,
I want to remove duplicate values and blank cells in excel . I have tried below code.
It shows run time errors.
If have any changes, please guide me.
Thank You....
I want to remove duplicate values and blank cells in excel . I have tried below code.
VBA Code:
Sub del_blanks_duplicates()
Dim i, j, lastrow As Long
Call Activate_Cluster
lastrow = Cells(Rows.Count, "A").End(xlUp).Row - 1
For i = lastrow To 1 Step -1
For j = 1 To i
If (Cells(i, 0) & Cells(i, 1) = Cells(j, 0) & Cells(j, 1)) Or (Cells(i, 0) = "") Then
MsgBox "The Record is Duplicate / Blanks", vbCritical, Cells(i, 0) + "-A"
Rows(i).EntireRow.Delete
Exit For
End If
Next j
Next i
End Sub
If have any changes, please guide me.
Thank You....