# How to count dates by week in Excel

List each week's start date and count the seven days from it: `=COUNTIFS($B$2:$B$13,">="&E2,$B$2:$B$13,"<"&E2+7)`, filled down.

**Excel:** `=COUNTIFS($B$2:$B$13,">="&E2,$B$2:$B$13,"<"&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 |
| --- | --- | --- | --- | --- | --- |
| Order | Date |  |  | Week of | Orders |
| W-01 | 2026-03-02 |  |  | 2026-03-02 |  |
| W-02 | 2026-03-04 |  |  | 2026-03-09 |  |
| W-03 | 2026-03-08 |  |  | 2026-03-16 |  |
| W-04 | 2026-03-09 |  |  | 2026-03-23 |  |
| W-05 | 2026-03-13 |  |  |  |  |
| W-06 | 2026-03-14 |  |  |  |  |
| W-07 | 2026-03-15 |  |  |  |  |
| W-08 | 2026-03-17 |  |  |  |  |
| W-09 | 2026-03-20 |  |  |  |  |
| W-10 | 2026-03-23 |  |  |  |  |
| W-11 | 2026-03-27 |  |  |  |  |
| W-12 | 2026-03-29 |  |  |  |  |

Formula in F2, filled to F5: `=COUNTIFS($B$2:$B$13,">="&E2,$B$2:$B$13,"<"&E2+7)`

Result: 3; 4; 2; 3

## How it works

A week is the seven days from its start date: on or after the Monday in column E and before the next Monday, `E2+7`. COUNTIFS counts the order dates in that window. The order column is locked with $ while E2 moves down to the next week.

The Sunday orders (March 8, 15 and 29) belong to the week that started the Monday before.

## Other ways

- `=SUMPRODUCT(--($B$2:$B$13-WEEKDAY($B$2:$B$13,2)+1=E2))`: Works out the Monday of each order's week and compares it with E2. The same idea gives a "week of" helper column: `=B2-WEEKDAY(B2,2)+1`.

## Common mistakes

- Week numbers from WEEKNUM depend on the system: type 1 starts weeks on Sunday, type 2 on Monday, and ISO weeks (ISOWEEKNUM) can put early January in week 52 or 53. Week start dates avoid the confusion.
- For weeks starting on Sunday, use `WEEKDAY(B2,1)` in the helper formula and Sunday dates in column E.

## Questions

**How do I get the week start dates automatically?**

Put the first Monday in E2 and use `=E2+7` in E3, filled down.

**How do I count by week number instead?**

Add a helper column with `=ISOWEEKNUM(B2)` and count it with COUNTIF.

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/count-dates-by-week
