回答編集履歴

2

修正

2021/12/31 02:49

投稿

hatena19
hatena19

スコア34075

test CHANGED
@@ -14,9 +14,9 @@
14
14
 
15
15
  Range(c.Value & "2") = WorksheetFunction.Sum(c.Offset(, 1).Resize(1, 4))
16
16
 
17
- Range(c.Value & "5") = WorksheetFunction.Sum(c.Offset(, 1).Resize(1, 4))
17
+ Range(c.Value & "5") = WorksheetFunction.Sum(c.Offset(, 1))
18
18
 
19
- Range(c.Value & "6") = WorksheetFunction.Sum(c.Offset(, 1).Resize(1, 4))
19
+ Range(c.Value & "6") = WorksheetFunction.Sum(c.Offset(, 1).Resize(1, 3))
20
20
 
21
21
  Next
22
22
 

1

コード微修正

2021/12/31 02:49

投稿

hatena19
hatena19

スコア34075

test CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  Dim r As Range, c As Range
10
10
 
11
- Set r = Range("Z2").CurrentRegion
11
+ Set r = Range("IZ2").CurrentRegion
12
12
 
13
13
  For Each c In r.Columns(1).Cells
14
14