Hi Olemacr,
Do you mean sum and average for each row and each column?
This approach makes use of the magical properties of Header Rows, Header Columns and Footer Rows. Those cells exclude themselves from formulas to avoid "self-reference" errors.
A table with one Header Row (1), two Header Columns (A and B) and two Footer Rows (8 and 9).

Formula in A2 (and Fill Down to Row 7)
=SUM(2:2)
Formula in B2 (and Fill Down to Row 7)
=AVERAGE(2:2)
Formula in C8 (and Fill Right)
=SUM(C)
Formula in C9 (and Fill Right)
=AVERAGE(C)
With such a table, you can add more data and the formulas will automatically adjust.
Regards,
Ian.