|    | 
     >もっと簡単に表記できそうな気もしてきましたが・・・もう寝ます。 
 
基準列を開始列にしてR1C1で記述したほうが、すっきりしました。 
 
Sub test2() 
 
Dim c As Integer '開始Columnの指定 
Dim GoukeiC As Integer '合計のColumn 
Dim LRow As Long 'D列の最終行 
 
With Worksheets(1) 
 
LRow = .Range("D65536").End(xlUp).Row 
c = 5 
GoukeiC = c + 25 
 
'合計 
.Range(.Cells(4, GoukeiC), .Cells(LRow, GoukeiC)).FormulaR1C1 _ 
= "=SUM(RC" & c & ":RC" & GoukeiC - 1 & ")" 
 
'累計 
.Cells(4, GoukeiC + 1).FormulaR1C1 = "=RC[-1]" 
.Range(.Cells(5, GoukeiC + 1), .Cells(LRow, GoukeiC + 1)).FormulaR1C1 _ 
= "=R[-1]C+RC[-1]" 
 
End With 
 
End Sub 
 
 | 
     
    
   |