Calculate weekly and monthly total in spreadsheet

前端 未结 2 1756
无人及你
无人及你 2021-01-13 14:35

How to calculate weekly sum (sum of last 7 rows printed in 7th row) based on daily values, same question for monthly (based on weekly or daily). I have tried some formulas b

2条回答
  •  死守一世寂寞
    2021-01-13 15:03

    For the week column, you can add a formula like =IF(WEEKDAY(A8)=7,sum(B2:B8),"") (to put the sum of the week on Sundays.

    For the month column: =IF(MONTH(A2)<>MONTH(A2+1),SUM(B$2:B2)-SUMIF(A$2:A2,"<"&DATE(YEAR(A2),MONTH(A2),1),B$2:B2),"")

提交回复
热议问题