
Sub Toglie_dop()
Dim Riga_e, Riga_o
For i = Range("A" & Rows.Count).End(xlUp).Row To 2 Step -1
Riga_e = Cells(i, 1) ''B=2 C=3 D=4 ecc
If i > 2 Then
Riga_o = Cells(i - 1, 1) ''B=2 C=3 D=4 ecc
End If
If Riga_e <> "" And Riga_o <> "" Then
If Riga_e = Riga_o Then
Cells(i, 1).Select ''B=2 C=3 D=4 ecc
Selection.EntireRow.Delete
End If
End If
Next i
Application.CutCopyMode = False
Range("A1").Select
End Sub |
