|
こんにちは
何かの参考になりませんか?
Sub TEST()
Dim f As Long
With Worksheets("Sheet1")
For f = 8 To 157 Step 52
.Range("B" & CStr(f), "B" & CStr(f + 45)).Interior.ColorIndex = 34
.Range("D" & CStr(f), "V" & CStr(f)).Interior.ColorIndex = 34
Union(.Range("G" & CStr(f)), .Range("N" & CStr(f)), _
.Range("Q" & CStr(f))).Interior.ColorIndex = xlNone
.Range("D" & CStr(f + 13), "V" & CStr(f + 13)).Interior.ColorIndex = 34
Union(.Range("G" & CStr(f + 13)), .Range("N" & CStr(f + 13)), _
.Range("Q" & CStr(f + 13))).Interior.ColorIndex = xlNone
.Range("D" & CStr(f + 22), "V" & CStr(f + 22)).Interior.ColorIndex = 34
Union(.Range("G" & CStr(f + 22)), .Range("N" & CStr(f + 22)), _
.Range("Q" & CStr(f + 22))).Interior.ColorIndex = xlNone
Next
End With
End Sub
|
|