|
理解有误,修正一下代码- Sub Macro1()
- Dim arr, d, i%, j%, k%, h%, l%
- Set d = CreateObject("scripting.dictionary")
- [a1:i9].Font.Size = 12
- For h = 1 To 7 Step 3
- For l = 1 To 7 Step 3
- arr = Cells(h, l).Resize(3, 3)
- For i = 1 To 3
- For j = 1 To 3
- s = arr(i, j)
- If Len(s) = 2 Then
- If Not d.exists(s) Then
- d(s) = Cells(h + i - 1, l + j - 1).Address
- Else
- d(s) = d(s) & "," & Cells(h + i - 1, l + j - 1).Address
- End If
- End If
- Next
- Next
- b = d.items
- For k = 0 To d.Count - 1
- If InStr(b(k), ",") Then Range(b(k)).Font.Size = 36
- Next
- d.RemoveAll
- Next
- Next
- End Sub
复制代码 |
|