Function Problems

Count Text and Date Criteria with SUMPRODUCT in Excel

Aamir Naveed AkramAamir Naveed Akram Nov 18, 2026 870 views

Question details

Count rows that meet several text conditions and fall within a date range using one SUMPRODUCT formula.

Count Text and Date Criteria with SUMPRODUCT in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the result cell

Click the cell where you want the count to appear.

2
Enter the formula

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.

3
Adjust the criteria

Edit the text values or row numbers in the formula as needed, keeping every range aligned to the same starting and ending rows.

Use SUMPRODUCT to count matching text and dates
Dates and times: The range includes today and the previous 14 calendar days, for 15 dates total. If column I contains timestamps, replace Combined!I8:I106<=TODAY() with Combined!I8:I106<TODAY()+1 to include all times today. Avoid full-column references for better performance.
Count matching rows in WPS Spreadsheets

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. 1. Open the workbook: In WPS Office, open the Excel workbook containing the Combined worksheet.
  2. 2. Choose a result cell: Click the cell where you want to display the count.
  3. 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. 4. Check the result: Review the count and use the formula bar to adjust the text criteria or aligned row ranges for your data.
Count text and date matches in one formulaOpen and save Microsoft Excel XLSX workbooksUse a familiar spreadsheet interfaceAdjust criteria and date ranges in the formula bar
microsoft office alternative - wps office

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.