|
Option Explicit
Sub TEST6()
Dim ar, br, i&, j&, dic As Object, vKey
Application.ScreenUpdating = False
Set dic = CreateObject("Scripting.Dictionary")
With [A1].CurrentRegion
ar = .Value
For i = 2 To UBound(ar)
dic(ar(i, 4)) = dic(ar(i, 4)) & " " & i
Next i
For Each vKey In dic.keys
br = Split(dic(vKey))
If UBound(br) > 1 Then
For i = 1 To UBound(br)
If ar(br(i), UBound(ar, 2)) <> "工" Then
For j = 7 To UBound(ar, 2) - 1
.Cells(br(i), j) = 0
Next j
End If
Next i
End If
Next
End With
Set dic = Nothing
Application.ScreenUpdating = True
Beep
End Sub
|
评分
-
1
查看全部评分
-
|