# How to sum by week in Excel

List the first day of each week and add the seven days from there: `=SUMIFS($C$2:$C$11,$A$2:$A$11,">="&E2,$A$2:$A$11,"<"&E2+7)`.

**Excel:** `=SUMIFS($C$2:$C$11,$A$2:$A$11,">="&E2,$A$2:$A$11,"<"&E2+7)` (Every current version)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- |
| Date | Route | Packages |  | Week of | Packages |
| 2026-03-02 | North | 148 |  | 2026-03-02 |  |
| 2026-03-04 | South | 162 |  | 2026-03-09 |  |
| 2026-03-06 | North | 155 |  | 2026-03-16 |  |
| 2026-03-08 | South | 97 |  |  |  |
| 2026-03-09 | North | 171 |  |  |  |
| 2026-03-11 | South | 149 |  |  |  |
| 2026-03-13 | North | 183 |  |  |  |
| 2026-03-16 | South | 158 |  |  |  |
| 2026-03-18 | North | 166 |  |  |  |
| 2026-03-21 | South | 112 |  |  |  |

Formula in F2, filled to F4: `=SUMIFS($C$2:$C$11,$A$2:$A$11,">="&E2,$A$2:$A$11,"<"&E2+7)`

Result: 562; 503; 436

## How it works

A week is a seven-day window: from the Monday in column E up to, but not including, the next Monday (`E2+7`). Using `<` for the end means Sunday March 8 counts in the first week and Monday March 9 starts the second.

## Other ways

- `=SUMPRODUCT(($A$2:$A$11-WEEKDAY($A$2:$A$11,3)=E2)*$C$2:$C$11)`: Moves every date back to its Monday (WEEKDAY type 3 gives Monday = 0) and compares with E2. Handy when the week list is not in order.

## Common mistakes

- Using `"<="&E2+7` counts the next Monday in two weeks. The end of the window must be strictly less than.
- The dates in column E must be the real start of each week. A Wednesday in E2 sums Wednesday to Tuesday.

## Questions

**How do I sum by week number?**

With WEEKNUM: `=SUMPRODUCT((WEEKNUM($A$2:$A$11,2)=E2)*$C$2:$C$11)` where E2 holds a week number. Use ISOWEEKNUM for ISO weeks, which start on Monday and can belong to the previous year.

**How do I get the Monday of the week for a date?**

Use `=A2-WEEKDAY(A2,3)`. For weeks starting on Sunday, use `=A2-WEEKDAY(A2)+1`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/sum-by-week
