|First, this sounds very much like a homework problem. We don't solve homework problems directly, but we will offer suggestions to help guide you to a solution.|
Second, Excel doesn't have "lines", it has Rows and Columns. Rows are designated by numbers, columns are typically designated by letters. By "line a, line b, etc." I assume you mean Row 1, Row 2, etc.
Third, your examples don't make sense.
You posted 2 ways to calculate "b"
b 7+7=14 average = 24/2 = 12
b = sum(a+(7+7)/2)
If a = 10, then your second example translates to SUM(10 + 14/2) = SUM(10 + 7) = 17, not 12.
Perhaps you meant =SUM(10+7+7)/2 which equals 12. The order of operations is very important.
In any case, if you want to automatically generate sequential numbers as you drag a formula down a columns, take a look at the ROW() function.
Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.