Hi adygelber
Try any one of these approaches
'--------------------------
' Using Formula Sum
maxrow = Range("AB7").Offset(nrAtt, 0).Row
For i = 28 To (nrFTE * nrCat) + 28 - 1
Cells(maxrow, i).Formula = "=SUM(" & Cells(7, i).Address & ":" & Cells(maxrow - 1, i).Address & ")"
Next i
' For i = 1 To nrFTE * nrCat
' For j = 0 To nrCat
' maxrow = Range("AB7").Offset(nrAtt, 0).Row
' totform = "=SUM(AB7:AB" & maxrow - 1 & ")"
' Range("AB" & nrAtt + 7).Offset(0, (i - 1)) = totform
' Next
' Next
'--------------------------
'--------------------------
' Using AutoFill
Dim LC As Long
LC = (nrFTE * nrCat) + 28 - 1
maxrow = Range("AB7").Offset(nrAtt, 0).Row
Range("AB" & maxrow).Formula = "=SUM(AB7:AB" & maxrow - 1 & ")"
Cells(maxrow, 28).AutoFill Destination:=Range(Cells(maxrow, 28), Cells(maxrow, LC)), Type:=xlFillDefault
' For i = 1 To nrFTE * nrCat
' For j = 0 To nrCat
' maxrow = Range("AB7").Offset(nrAtt, 0).Row
' totform = "=SUM(AB7:AB" & maxrow - 1 & ")"
' Range("AB" & nrAtt + 7).Offset(0, (i - 1)) = totform
' Next
' Next
'--------------------------
'--------------------------
' Using Worksheet Function Sum
Dim SumRng As Range
maxrow = Range("AB7").Offset(nrAtt, 0).Row
For i = 28 To (nrFTE * nrCat) + 28 - 1
Set SumRng = Range(Cells(7, i), Cells(maxrow - 1, i))
Cells(maxrow, i).Value = Application.WorksheetFunction.Sum(SumRng)
Next i
' For i = 1 To nrFTE * nrCat
' For j = 0 To nrCat
' maxrow = Range("AB7").Offset(nrAtt, 0).Row
' totform = "=SUM(AB7:AB" & maxrow - 1 & ")"
' Range("AB" & nrAtt + 7).Offset(0, (i - 1)) = totform
' Next
' Next
'--------------------------
Bookmarks