Count Text and Date Criteria with SUMPRODUCT in Excel
Question details
Count rows that meet several text conditions and fall within a date range using one SUMPRODUCT formula.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet named Combined contains text criteria in columns B, D, and K and dates in column I.
- Observed behavior
- The desired result is a count of matching rows dated from 14 days ago through today, inclusive.
Check that the criteria ranges cover the same rows and that column I contains real Excel dates, not text. Confirm whether the date cells contain times, because those affect the upper date boundary.
Use SUMPRODUCT to count matching text and dates
Use this formula when all criteria must match in the same row and the dates do not include time values.
Click the cell where you want the count to appear.
Type =SUMPRODUCT((Combined!B8:B106="EVS")*(Combined!D8:D106="External")*(Combined!K8:K106="Pending")*(Combined!I8:I106<=TODAY())*(Combined!I8:I106>=TODAY()-14)) and press Enter.
Edit the text values or row numbers in the formula as needed, keeping every range aligned to the same starting and ending rows.

Apply the SUMPRODUCT formula in WPS Spreadsheets
Open your workbook in WPS Spreadsheets and use SUMPRODUCT to count rows matching the same text and date criteria.
- 1. Open the workbook: In WPS Office, open the Excel workbook containing the Combined worksheet.
- 2. Choose a result cell: Click the cell where you want to display the count.
- 3. Enter SUMPRODUCT: Enter =SUMPRODUCT((Combined!B8:B106="EVS")*(Combined!D8:D106="External")*(Combined!K8:K106="Pending")*(Combined!I8:I106<=TODAY())*(Combined!I8:I106>=TODAY()-14)) and press Enter.
- 4. Check the result: Review the count and use the formula bar to adjust the text criteria or aligned row ranges for your data.

Frequently Asked Questions
Why must all SUMPRODUCT ranges cover the same rows?
SUMPRODUCT evaluates the conditions together for each position in the ranges. Use aligned ranges such as B8:B106, D8:D106, I8:I106, and K8:K106 so each position refers to the same record.
Does TODAY()-14 include 14 or 15 calendar dates?
With both boundaries inclusive, TODAY()-14 through TODAY() covers 15 calendar dates. To include today and the preceding 13 dates instead, use TODAY()-13 as the lower boundary.
How do I include timestamps from all of today?
Replace the upper condition I8:I106<=TODAY() with I8:I106<TODAY()+1. Keep the worksheet name in the reference if the formula is on another sheet.
How can I check whether a date is stored as text?
In an empty cell, enter =ISNUMBER(Combined!I8). TRUE indicates a numeric value, which can be an Excel date; FALSE indicates it is not numeric. Check the cell's displayed value and date format as well.
Will blank dates be counted?
With the stated recent-date range, blank date cells do not meet the lower boundary under normal current-date conditions. Review column I for blanks and text dates if the count is unexpected.




