|
こんばんは
なんか更に意味が分からなくなってますね。
Sub test2()
Dim v As Variant
Dim lc As Long
Dim r As Long
Dim m As Long
Dim i As Long
Const lr As Long = 90
v = Worksheets("Sheet1").Range("D2:D33").Value
With ActiveSheet
If .Name = "Sheet1" Then
MsgBox "Sheet1以外をアクティブにして実行する事。", 64
Exit Sub
End If
Application.ScreenUpdating = False
r = 3
i = 1
Do While r <= lr
m = 6
Select Case True
Case r = 3 Or r = 7
lc = 20
Case (r > 14) And (r Mod 4 = 3)
lc = 20
Case Else
lc = 14
End Select
Do While m <= lc
.Cells(r, m).Value = v(i, 1)
i = i + 1
If i > 32 Then i = 1
m = m + 2
Loop
r = r + 1
Loop
Application.ScreenUpdating = True
End With
End Sub
合ってるかどうか分かりませんけど。
|
|