|
发表于 2017-9-13 16:23
|
显示全部楼层
本楼为最佳答案
删除行操作,不要指望速度。
- Sub aaa()
- Dim i&
- For i = [b65536].End(3).Row + 1 To 5 Step -1
- If Cells(i, 2).MergeCells = True Then
- If Application.CountA(Cells(i, 16).Resize(, 4)) > 0 Then
- If Application.CountA(Cells(i - 1, 16).Resize(, 4)) > 0 Then
- Cells(i - 1, 20).Resize(, 4) = Cells(i, 16).Resize(, 4).Value
- Else
- Cells(i - 1, 16).Resize(, 4) = Cells(i, 16).Resize(, 4).Value
- End If
- End If
- Rows(i).Delete
- End If
- Next i
- End Sub
复制代码 |
|