My mistake, I thought you only wanted the last row value of AV. Try

Sub puutsx()
Range("AV" & Range("AV" & Rows.Count).End(3)(2).Row).Formula = "=IF(SUM(" & Range("AV2:AV" & Range("AV" & Rows.Count).End(3).Row).Address(False, False) & ")=0,"""",SUM(" & Range("AV2:AV" & Range("AV" & Rows.Count).End(3).Row).Address(False, False) & "))"
End Sub