The following chages to your script will make everything relative to a range object (rFirstCell) rather than a cell position (Untested).

[vba]For i = 1 To nrFTE
Set rFirstCell = Range("AB7")
sCol = Split(rFirstCell.Address, "$")(1)
For j = 0 To nrCat
maxRow = rFirstCell.Offset(nrAtt, 0).Row
totform = "=SUM(" & rFirstCell.Address & ":" & sCol & maxRow - 1 & ")"
Range(sCol & nrAtt + 7).Offset(0, (i - 1)) = totform
Next
Next
[/vba]