Course outline / Date and time functions
Lesson 40 of 75 · Intermediate · 4 exercises
Totals between dates
Count and total the rows that fall between a start date and an end date.
What you'll practise
- Count orders on or after a date
- Total between two dates
- Count between two dates
- A region within a date range
Count orders on or after a date
Dates are numbers, so they work with comparison operators. Use >= for "on or after".
In cell F2, count the dates in A2:A6 that are on or after the date in G2.
Total between two dates
To total a date range, test the same date column twice in SUMIFS: on or after the start, and on or before the end.
In cell F2, add up the amounts in D2:D6 with dates from G2 to H2, including both days.
Count between two dates
In cell F2, count the orders in A2:A6 dated from G2 to H2, using COUNTIFS.
A region within a date range
In cell F2, add up the East amounts (B2:B6) in D2:D6 with dates from G2 to H2.
Try it in a real spreadsheet
Every step checks your answer instantly and tells you exactly what to fix.