Home > front end >  Another question for a quicker way to perform a running total
Another question for a quicker way to perform a running total

Time:08-04

I need to create a spill formula for a running total

enter image description here

I'm able to create this formula using

=SUMIF($B$2:$D$2,"<="&COLUMN($B$2:$D$2)-1,B3:D3)

But I'm not able to understand how to make it work as one formula only so that I don't have to drag for each row hoping someone can assist

CodePudding user response:

We can use OFFSET and SUMIF:

=SUMIF(OFFSET(B3,SEQUENCE(ROWS(B3:D8),,0),0,1,SEQUENCE(,COLUMNS(B3:D8))),"<>")

enter image description here

CodePudding user response:

If all you need is a running total, SUM/INDEX can handle that:

=SUM($B3:INDEX(3:3,,COLUMNS($B3:B3) 1))

Copy over and down

  • Related