I'm looking for a formula to calculate the total loss/gain for a given range of cells. Admittedly, this is for a weight loss/fitness worksheet to track my progress or regression. (irrelevant?)

What I am wanting (and going crazy trying to figure out) is a column of data entry and then a single cell representing the total loss or gain.

EX:

A1 = 140
A2 = 138
A3 = 139
A4 = 135
A5 = 136
A6 =
A7 =

A9 = total difference

I hope this is making sense. Between A1 and A2 there is a loss, so when A3-A7 are blank, I want A9 to represent all data differences from A1-A7 (blanks having no effect on the total). The from A2 to A3 there is a gain... etc. So I suppose I'm asking for a formula that can add AND subtract into a running total.

In addition, if there is any gain over the previous week's entry I would like that cell to be shaded by a color... if possible.

I truly hope y'all can help me with this formula. Thank you in advance.

PS I did read the forum rules; if my title is insufficient, please offer me a suggestion for improvement.