Google-sheets – Google Sheets formula for weekly column totals

formulasgoogle sheets

I'm a bit of a newbie to Google Sheets formulas and such.

I have a set of data entered daily with the dates converted by WEEKNUM() to display and allow me to filter by week no. I want to add the values for a number of entries by the resultant week no. to obtain a weekly total for different columns.

enter image description here
(Click image to enlarge)

Best Answer

If column B has week number and columns E,F,G,H,I,J have quantities for which you need weekly totals, then query returns the relevant totals:

=query(B:J, "select B, sum(E), sum(F), sum(G), sum(H), sum(I), sum(J) group by B")

Alternatively, you can create a pivot table report.