How to Count Excel Dates from Today Through the Next 30 Days
Question details
The user needs to calculate the number of cells containing dates that fall within a rolling 30-day window starting from the current date.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking upcoming deadlines, project milestones, or expirations by creating a dynamic 30-day overview.
- Observed behavior
- A dynamic formula is required to evaluate the date range because standard single-condition functions cannot define both the start date and the 30-day end limit.
Ensure that the data in your selected range is formatted correctly as dates, rather than text strings, so the formulas can evaluate them properly.
Use COUNTIFS with Two Date Criteria
By utilizing the COUNTIFS function along with the TODAY() function, you can evaluate multiple criteria on the same range to establish a rolling minimum and maximum boundary.
Since the COUNTIF function only evaluates a single condition, it cannot capture a complete date range. The COUNTIFS function resolves this by allowing you to define a starting condition (today) and an ending condition (30 days from today).
Because the formula uses the TODAY() function, the count will automatically update every time you open the spreadsheet on a new day.
Click on a blank cell where you want the final date count to be displayed.
Type the formula: =COUNTIFS(Sheet1!$E$2:$E$100,">="&TODAY(),Sheet1!$E$2:$E$100,"<="&TODAY()+30)
Modify the 'Sheet1!$E$2:$E$100' portion of the formula to match the actual worksheet name and cell range where your date data is stored.
Press Enter to execute the formula. The cell will now display the total count of dates falling within the upcoming 30-day window.

Easily Track Dynamic Dates with WPS Spreadsheet
WPS Spreadsheet fully supports advanced functions like COUNTIFS and TODAY(), making it easy to track deadlines, build dynamic dashboards, and manage data without any subscription fees.
- 1. Open your workbook: Launch WPS Office, select Spreadsheet, and open the document containing your dates.
- 2. Select your output cell: Click on an empty cell where you want to calculate the upcoming 30-day deadlines.
- 3. Enter the formula: Navigate to the Formula tab, or directly type your COUNTIFS formula combining ">="&TODAY() and "<="&TODAY()+30 into the formula bar.
- 4. View your dynamic count: Hit Enter. WPS Spreadsheet will automatically recalculate this rolling 30-day window each day.

Frequently Asked Questions
Why does my COUNTIFS formula return 0 even though there are dates in the next 30 days?
This commonly occurs if the dates in your target range are formatted as text rather than actual date values. To fix this, highlight the column, go to the Data tab, and use the 'Text to Columns' feature to convert them to a recognizable date format.
Can I use COUNTIF instead of COUNTIFS for this date range task?
No. The COUNTIF function can only evaluate a single condition. Since tracking dates between today and the next 30 days requires checking two boundaries (greater than or equal to today, and less than or equal to today + 30), the COUNTIFS function is required.
How can I count dates strictly in the past 30 days?
You can modify the COUNTIFS formula criteria to look backwards. Use ">="&TODAY()-30 for your minimum date criteria and "<="&TODAY() for your maximum date criteria.




