How to increment row number in formula?

The increment of row number in a formula has to do with the functions that are utilized in the successfulness of increment. But first, we need a data like this:

data table

You should click on an empty cell (1), and then type in this formula using SUM, OFFSET and COLUMN together in one formula: =SUM(OFFSET($A$1;0;0;COLUMN(B1))) (2).

sum offset column

Proof that there is a success in the increment by clicking on the small square that shows on lower-right corner of the dark green, and drag it to left.

second formula

Note: It is better to only stick to 3, because after the third it will be showing the same number over and over again.

increment row formula

In conclusion, after following those two steps, you should have something like this.