|
Private Sub CommandButton1_Click()
Set dica = CreateObject("Scripting.Dictionary")
For i = 2 To 99
If Cells(i, 24).Value > 0 Then dica(Cells(i, 24).Value) = i
Next
Set dicb = CreateObject("Scripting.Dictionary")
With Worksheets("空表")
For i = 2 To 444
If .Cells(i, 24).Value > 0 Then dicb(.Cells(i, 24).Value) = i
Next
End With
Dim arr
For i = 57 To 1 Step -1
If dica(i + 1) - dica(i) > 1 Then
arr = Cells(dica(i) + 1, 1).Resize(dica(i + 1) - dica(i) - 1, 14)
Sheets("空表").Rows(dicb(i) + 1).Resize(dica(i + 1) - dica(i) - 1).Insert (3)
Sheets("空表").Cells(dicb(i) + 1, 1).Resize(dica(i + 1) - dica(i) - 1, 14) = arr
End If
Next
End Sub
附件:
复件 问题.zip
(198.33 KB, 下载次数: 27)
|
评分
-
1
查看全部评分
-
|