|
代码如下。。。
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = "$L$1" Then
arr = [e9:f68]
Set d = CreateObject("scripting.dictionary")
Set d1 = CreateObject("scripting.dictionary")
For j = 1 To UBound(arr, 2)
For i = 1 To UBound(arr)
s = arr(i, 1): ss = arr(i, 2)
If s <> 0 Then d(i) = s
If ss <> 0 Then d1(i) = ss
Next
Next
[l63].CurrentRegion.ClearContents
Cells(63 - d.Count + 1, "l").Resize(d.Count) = Application.Transpose(d.items)
Cells(63 - d1.Count + 1, "m").Resize(d1.Count) = Application.Transpose(d1.items)
End If
Application.EnableEvents = True
End Sub
|
|