How to count dates by week in Excel
Formula (Excel and Google Sheets)
=COUNTIFS($B$2:$B$13,">="&E2,$B$2:$B$13,"<"&E2+7)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.
- Result on the example
- one result per row in
F2, filled down toF5 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in F2, filled down to F5. Change any input and the result updates, or edit the formula to experiment.
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.
=COUNTIFS($B$2:$B$13,">="&E2,$B$2:$B$13,"<"&E2+7)Result3
$B$2:$B$1312 rows × 1 col: Mar 2, 2026, Mar 4, 2026, Mar 8, 2026, Mar 9, 2026, …A range: 12 cells in one column.
E2Mar 2, 2026The value in E2.
">="&E2">=46083"The & operator joins as text.
E2+746090The + operator adds.
"<"&E2+7"<46090"The & operator joins as text.
COUNTIFS($B$2:$B$13,">="&E2,$B$2:$B$13,"<"&E2+7)3COUNTIFS: Counts rows that meet every condition.- criteria_range1
$B$2:$B$1312 rows × 1 col: Mar 2, 2026, Mar 4, 2026, Mar 8, 2026, Mar 9, 2026, … - criteria1
">="&E2">=46083" - criteria_range2
$B$2:$B$1312 rows × 1 col: Mar 2, 2026, Mar 4, 2026, Mar 8, 2026, Mar 9, 2026, … - criteria2
"<"&E2+7"<46090"
- criteria_range1
In Google Sheets
The same formula works in Google Sheets: =COUNTIFS($B$2:$B$13,">="&E2,$B$2:$B$13,"<"&E2+7). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =SUMPRODUCT(--($B$2:$B$13-WEEKDAY($B$2:$B$13,2)+1=E2)) | 3, 4, 2… | 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.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Count dates by week
F2, count the orders in the week that starts on E2, then fill down to F5.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.
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.