Forum Discussion
Jacob_PWR
Feb 08, 2022Copper Contributor
Sum columns based on date
Looking for some help creating a sum formula that updates based on a date - stumped on this one. In the example I have created a "Week Start Date" (cell A16) represents the first Sunday of each week ...
Martin_Weiss
Feb 09, 2022Bronze Contributor
Hi Jacob_PWR
I give it a try. Here is my solution:
=SUMIFS(B2:R2;B1:R1;">="&(B5-WEEKDAY(B5)+1);B1:R1;"<="&(B5-WEEKDAY(B5)+5*7))
For demonstration purposes, it covers just 5 weeks, therefore the +5*7 at the end of the formula. For 13 weeks just change to 13*7 (or 91)
I added my example file, so you can easier discover.