| 
    
     |  | データレイアウトの記述は手抜きしないでちゃんと書いてください。 こちらは、提示されたデータレイアウトでコード書いていますので....。
 
 最初に書いたコードを
 このデータだけで試してみてください。
 
 A B C D E F G  H  I  J  K  L  M
 1〜6行は空白です。
 
 7       100  2  50 60 78 80 90
 8        90 11  13 25 22 11  3
 9        5  5  5  5  5  5  5
 10        1  2  3  4  4  5  1
 11
 12
 13
 14        2 11  15 10 80 91  2
 15       10  4  5  6  6  6  6
 
 *********************
 Sub sffgh3()
 Dim Cure As Range, Gcure As Range, STR As Range, GK() As Long
 Dim CCR As Long
 Set STR = Range("G7")
 CCR = 8
 ReDim GK(1 To CCR)
 Do Until STR.End(xlDown).Row = 65536
 With STR
 Set Gcure = Nothing
 SSR = STR.End(xlDown).Row - STR.Row + 1
 Set Cure = STR.Resize(SSR, CCR)
 With Cure
 Set Gcure = .Offset(.Rows.Count).Resize(1)
 For i = 1 To .Cells.Columns.Count
 Gcure.Cells(i).Value = Application.Sum(.Cells.Columns(i))
 Gcure.Cells(i).Font.Bold = True
 GK(i) = GK(i) + Application.Sum(.Cells.Columns(i))
 Next
 End With
 End With
 Set STR = Gcure.Cells(i).End(xlDown)
 Set Cure = Nothing
 Loop
 Gcure.Cells(i).Resize(, CCR).Value = GK
 Gcure.Cells(i).Resize(, CCR).Font.Bold = True
 Set STR = Nothing
 Set Gcure = Nothing
 Erase GK
 End
 End Sub
 
 
 |  |