Function Problems

Count Nonblank Excel Entries for Today or Yesterday

Phi Hung VoPhi Hung Vo Nov 18, 2026 869 views

Question details

Count nonblank entries in column B when the corresponding date in column A is today or yesterday.

Count Nonblank Excel Entries for Today or Yesterday
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet stores dates in column A and text entries in column B; the user needs a date-based count of nonblank entries.
Observed behavior
The current COUNTIF expression is invalid and does not produce the desired count.
Before you start

Check that column A contains real Excel dates rather than text, and determine whether the values include times. The formulas below assume dates are in column A and entries are in column B.

Solution 1Recommended

Count nonblank entries for a date without time values

Use COUNTIFS when column A contains date-only values.

1
Count today's entries

Select an empty cell and enter =COUNTIFS(A:A,TODAY(),B:B,"<>") to count nonblank cells in column B whose date in column A is today.

2
Count yesterday's entries

In another empty cell, enter =COUNTIFS(A:A,TODAY()-1,B:B,"<>") to count entries dated yesterday.

Count nonblank entries for a date without time values
Dates update automatically: TODAY() uses the current date from your device. The counts change as the date changes.
WPS Spreadsheets

Count entries by date in WPS Spreadsheets

Use COUNTIFS and TODAY in WPS Spreadsheets to count nonblank entries for today or yesterday, including dates with times.

  1. 1. Open the worksheet: Open WPS Spreadsheets and use Open to select your Excel workbook.
  2. 2. Check the columns: Confirm that dates are in column A and the entries to count are in column B.
  3. 3. Enter the formula: Select an empty cell and enter =COUNTIFS(A:A,TODAY(),B:B,"<>") for today's date-only entries, or replace TODAY() with TODAY()-1 for yesterday.
  4. 4. Handle timestamps if needed: If column A includes times, enter =COUNTIFS(A:A,">="&TODAY(),A:A,"<"&TODAY()+1,B:B,"<>") instead to count today's entries.
Count entries using multiple date and nonblank criteriaOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and a familiar interfaceWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does an exact TODAY() match miss some entries?

Cells in column A may contain times as well as dates. Use a range from >=TODAY() to <TODAY()+1 in COUNTIFS to include the whole day.

How do I count yesterday and today together?

Enter =COUNTIFS(A:A,">="&TODAY()-1,A:A,"<"&TODAY()+1,B:B,"<>") in an empty cell. This includes timestamps on both days.

What does the "<>" criterion count?

In =COUNTIFS(A:A,TODAY(),B:B,"<>"), the "<>" criterion counts nonblank cells in column B that also meet the date condition.

What if the dates in column A are stored as text?

Convert them to real Excel dates first. Select column A, then use Data > Text to Columns and choose the appropriate date format in the final step.