Search code examples
excelexcel-formulasumifs

sumif for previous week


I tried SUMIF formula to calculate data for Previous week only but it seems to be incorrect since the below formula excludes previous day. Help me out.

=SUMIFS(AK:AK,T:T,(">="&WORKDAY(TODAY(),-5)))


Solution

  • If you want to sum all days from the Monday of the past week onwards, try

    =SUMIFS(AK:AK,T:T,">="&DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()) + 2-WEEKDAY(TODAY()))-7)