回答編集履歴

1

コード修正

2020/04/20 00:59

投稿

hatena19
hatena19

スコア34075

test CHANGED
@@ -26,15 +26,17 @@
26
26
 
27
27
  'コピー&貼り付け
28
28
 
29
+ Dim c As Range
30
+
29
- For i = 1 To rng.Count
31
+ For Each c in rng.Cells
30
32
 
31
33
  If i < 11 Then
32
34
 
33
- .Range("D" & i + 12) = rng(i)
35
+ .Range("D" & i + 12) = c
34
36
 
35
37
  Else
36
38
 
37
- .Range("E" & i - 7) = rng(i)
39
+ .Range("E" & i - 7) = c
38
40
 
39
41
  End If
40
42