To refer to the current cell I sometimes use OFFSET and use A1 as the
start point.
OFFSET(reference,rows,cols,height,width)
=SUM(D5:OFFSET(A1,ROW()-2,COLUMN()-1))
Will sum the contents of column D from D5 to two rows above the cell
containing the formula.
I do this because of inserting rows. The offset makes *certain* of the
range being summed