0

Running tally breaking over several rows

I am trying to create a running tally on a report that has five rows that expand. I can't figure out how to keep the tally going when the row changes.
Column R has the tally.
(Row 1) =IF(COUNTIF($E1:$E5,$E5)=1,$O5,$O5+$R4)
(Row 2) =R5+O6
(Row 3) =R6+O7
(Row 4) =R7+Q8
(Row 5) =R8+Q9

Row 1 works perfectly upon expansion. But in Row 2 I do not know how to account for the expansion. It no longer starts at R5 - it could start at R12, but it counts R5. I've tried SUMIF, but it does not account for the expansion either - if I sum over a range, the range just shifts down. If I lock it at R1, then when the five rows repeat they are locked at R1 instead of where they should be. Thanks for any help.

5 comments

Please sign in to leave a comment.