How do i do autosum in excel i tried recording it but i got

Range("J22").Select
ActiveCell.FormulaR1C1 = "=SUM(R[-20]C:R[-1]C)"

But the range i have to add changes in size could anyone help???