
=SUMIFS(sumrange,weekrange,week)
Related formulas
Sum if by year
Sum by month
Sum by week
To sum by week, you can use a formula based on the SUMIFS function. In the example shown, the formula in H5 is:
=SUMIFS(total,color,$G5,week,H$4)
where "total" is the named range D5:D16, "color" is the named range B5:B16, and "week" is the named range E5:E16.
The SUMIFS function can sum ranges based on multiple criteria.
In this problem, we configure SUMIFS to sum amounts in the named range "total" by week number using two criteria:
=SUMIFS(total,color,$G5,week,H$4)
Note $G5 and H$4 are both mixed references, so that the formula can be copied throughout the table.
Column E is a helper column, and contains the WEEKNUM function:
=WEEKNUM(C5)
Week numbers in row 4 are numeric values using the custom number format "Wk "0.

=SUMIFS(sumrange,weekrange,week)
Related formulas
Sum if by year
Sum by month
Sum by week
To sum by week, you can use a formula based on the SUMIFS function. In the example shown, the formula in H5 is:
=SUMIFS(total,color,$G5,week,H$4)
where "total" is the named range D5:D16, "color" is the named range B5:B16, and "week" is the named range E5:E16.
The SUMIFS function can sum ranges based on multiple criteria.
In this problem, we configure SUMIFS to sum amounts in the named range "total" by week number using two criteria:
=SUMIFS(total,color,$G5,week,H$4)
Note $G5 and H$4 are both mixed references, so that the formula can be copied throughout the table.
Column E is a helper column, and contains the WEEKNUM function:
=WEEKNUM(C5)
Week numbers in row 4 are numeric values using the custom number format "Wk "0.