1.VBA ROWS函数的使用,ROWS为查找返回单元格行数函数。
2.实例:Sub test()
Dim a, b As Integer
a = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
For b = a To 3 Step -1
If Application.WorksheetFunction.CountIf(Range("A3:A" & b), Range("A" & b)) > 1 Then
Rows(b).Delete shift:=xlUp
End If
Next b
End Sub