Formula Errors

How to Count Records Where One Date is Later Than Another in Excel

Rana GarciaRana Garcia Nov 10, 2026 869 views

Question details

The user needs to count specific rows in an Excel dashboard based on two criteria: a matching text value in one column and a date in a second column being greater than a date in a third column.

How to Count Records Where One Date Is Later Than Another in Excel
Product
Excel
Device & OS
not provided
Scenario
Building an operational dashboard to track overdue tasks or records where a received date is chronologically later than a due date.
Observed behavior
The user requires a formula that can evaluate multiple columns simultaneously to return an accurate count of matching records without throwing a formula error.
Before you start

Ensure that the columns containing your received and due dates are properly formatted as 'Date' in Excel rather than plain text, as text formatting will prevent chronological comparison calculations.

Solution 1Recommended

Use a SUM Array Formula to Compare Dates and Count Records

This approach uses an array calculation within the SUM function to evaluate multiple conditions row-by-row and output the total count.

By multiplying two or more conditions together in an array formula, Excel evaluates them logically and returns a TRUE (1) or FALSE (0) for each row. The SUM function then adds up all the 1s, giving you the total count of rows that meet all your specified criteria.

1
Identify your data ranges

Locate the column containing your text condition (e.g., column J for agency name), the received dates (column AO), and the due dates (column AN).

2
Select the destination cell

Click on the cell in your dashboard where you want the final count to be displayed.

3
Enter the SUM formula

Type =SUM(('Sheet Name'!$J$2:$J$1000="Name")*('Sheet Name'!$AO$2:$AO$1000>'Sheet Name'!$AN$2:$AN$1000)) into the formula bar. Replace 'Sheet Name', 'Name', and the cell ranges with your actual worksheet data.

4
Execute the formula

Press Enter to apply the formula. If you are using an older version of Excel, you may need to press Ctrl + Shift + Enter to calculate it as an array formula.

Use a SUM Array Formula to Compare Dates and Count Records
Absolute References: Using dollar signs ($) in your cell references (like $J$2:$J$1000) prevents the ranges from shifting if you copy and paste the formula to other cells.
Efficient Data Analysis with WPS Spreadsheet

Easily Compare Dates and Count Records in WPS Office

WPS Spreadsheet fully supports advanced array formulas like SUM and SUMPRODUCT, allowing you to build complex dashboards and compare data seamlessly. It offers a familiar interface and perfect compatibility with standard spreadsheet workflows.

  1. 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open your spreadsheet file containing the date records.
  2. 2. Apply the array formula: Select your target cell and enter the same =SUM(...) or =SUMPRODUCT(...) formula to compare your date columns.
  3. 3. Format and review: Ensure your date columns are properly formatted using the 'Format Cells' dialog, and press Enter to generate your count.
Seamless compatibility with Microsoft Excel (.xlsx) formats and formula structures.Free, lightweight, and fast-loading spreadsheet application.Built-in data validation and extensive date formatting tools.Advanced formula support for complex conditional counting and array operations.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my formula returning 0 instead of the correct count?

This usually happens if the dates are stored as text. Select your date columns, go to the Data tab, and use the 'Text to Columns' feature or format the cells as 'Date' to ensure the application recognizes them as chronological values.

Can I use COUNTIFS to compare two columns in Excel?

No, the COUNTIFS function requires a static criteria or single-cell reference and cannot compare one dynamic range directly against another range in the same formula. You must use SUM or SUMPRODUCT array formulas for row-by-row comparisons.

Do I need to use Ctrl+Shift+Enter for these formulas?

If you are using Microsoft 365 or a newer version with dynamic arrays, simply pressing Enter works. For older versions of Excel, using the SUM array formula requires Ctrl+Shift+Enter, whereas SUMPRODUCT works with just Enter.

How can I add a third condition to this formula?

You can simply add another multiplication block. For example, add *('Sheet Name'!$A$2:$A$1000="Status") inside your existing SUM formula to apply a third filtering condition.