|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub smt()
Dim d As Object, rng As Range
Dim ar, i&
Set d = CreateObject("scripting.dictionary")
Set rng = Nothing
ar = Sheet5.[a1].CurrentRegion
For i = 1 To UBound(ar)
s = ar(i, 4) & ar(i, 17) & ar(i, 18)
If d.exists(s) Then
If rng Is Nothing Then
Set rng = Cells(i, 4)
Else
Set rng = Union(rng, Cells(i, 4))
End If
Else
d(s) = ""
End If
Next
If Not rng Is Nothing Then rng.EntireRow.Delete
End Sub
Sub smt()
Dim d As Object, rng As Range
Dim ar, i&
Set d = CreateObject("scripting.dictionary")
Set rng = Nothing
ar = Sheet5.[a1].CurrentRegion
For i = 1 To UBound(ar)
s = ar(i, 4) & ar(i, 17) & ar(i, 18)
If d.exists(s) Then
If rng Is Nothing Then Set rng = Cells(i, 4)
Else
Set rng = Union(rng, Cells(i, 4))
End If
Else
d(s) = ""
End If
Next
If Not rng Is Nothing Then rng.EntireRow.Delete
End Sub
|
|