Forum Discussion
RonnieLCCC
Jan 19, 2022Copper Contributor
Need a formula that has a running calculation
I have a spreadsheet with 6 columns: 1 - Monday totals 2 - Tuesday totals 3 - Wednesday totals 4 - Thursday totals 5 - Friday totals 6 - Difference For #6, I need a formula that takes Monday t...
OliverScheurich
Jan 19, 2022Gold Contributor
=SUM(INDIRECT("A2:A"&COUNTA(A:A)))-SUM(INDIRECT("B2:B"&COUNTA(B:B)))-SUM(INDIRECT("C2:C"&COUNTA(C:C)))-SUM(INDIRECT("D2:D"&COUNTA(D:D)))-SUM(INDIRECT("E2:E"&COUNTA(E:E)))
Maybe with this formula as shown in the attached file.
RonnieLCCC
Jan 19, 2022Copper Contributor
Actually we figured out how to solve it: =IF(F14>0,F14-B14,IF(E14>0,E14-B14,IF(D14>0,D14-B14,IF(C14>0,C14-B14,0))))
Thanks!
Thanks!
- mtarlerJan 19, 2022Silver Contributorglad you found a solution. I might suggest to simplify using IFS:
=IFS(F14>0,F14-B14,E14>0,E14-B14,D14>0,D14-B14,C14>0,C14-B14,1,0)
or you could try something more compact like:
=OFFSET(B14,0,COUNT(C14:F14))-B14
but if you understand the IF/IFS better then maybe stick with that.- RonnieLCCCJan 19, 2022Copper ContributorThanks!