|
发表于 2016-3-29 22:09
|
显示全部楼层
本楼为最佳答案
- Sub Macro1()
- Dim d, rng As Range, j%, k%
- Set d = CreateObject("scripting.dictionary")
- [b24:cn26].Interior.ColorIndex = xlNone
- For j = 2 To 90
- Set rng = Cells(24, j).Resize(3, 3)
- For k = 7 To 9
- d(rng(k).Value) = ""
- Next
- If d.Count = 3 Then
- For k = 1 To 6
- d(rng(k).Value) = ""
- Next
- Else
- d.RemoveAll
- GoTo 100
- End If
- If d.Count > 6 Then rng.Interior.ColorIndex = 3: d.RemoveAll
- 100:
- Next
- End Sub
复制代码 |
|