|
发表于 2014-12-6 22:50
|
显示全部楼层
本楼为最佳答案
- Sub Macro1()
- Dim arr, d, i%, j&, h%, l&
- Application.ScreenUpdating = False
- Set d = CreateObject("scripting.dictionary")
- For i = 4 To 6
- For j = 2 To 256 - i + 1
- arr = Cells(22, j).Resize(2, 4)
- For h = 1 To UBound(arr)
- For l = 1 To UBound(arr, 2)
- d(arr(h, l)) = ""
- Next
- Next
- If d.Count = i Then Cells(22, j).Resize(2, 4).Interior.ColorIndex = i
- d.RemoveAll
- Next
- [a22:iv23].Copy Cells(22 + (i - 3) * 3, 1)
- [a22:iv23].Interior.ColorIndex = xlNone
- Next
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|