» Avoiding Errors when Counting Date Values that Meet Specified Criteria
CATEGORY - Excel Formula and Function
VERSION - All Microsoft Excel Versions
Problem:The range A2:B9 contains a series of dates and the corresponding number of hours worked on each of them.
An empty cell in column B that matches a date in column A indicates that 0 hours were worked on that day.
The range may also include blank rows.
The following formula was created to count the number of days in January for which 0 hours were worked:
=SUMPRODUCT((MONTH(A2:A9)=1)*(ISBLANK(B2:B9)))
However, an incorrect result of 3 was returned.
Solution:
Use the SUMPRODUCT, MONTH, ISBLANK, and ISNUMBER functions as shown in the following formula:
=SUMPRODUCT((MONTH(A2:A9)=1)*(ISBLANK(B2:B9))*(ISNUMBER(A2:A9)))
Book Store:
Recommended Books:
- Windows XP for Dummies
- The Intelligent Investor: The Classic Bestseller on Value Investing
- The Fall of Advertising and the Rise of PR
- Microsoft Excel 2002 Formulas (With CD-ROM)
- East of Eden (Oprah's Book Club)
- Rich Dad's Guide to Investing: What the Rich Invest in, That the Poor and the Middle Class Do Not!
No comments have been submitted.

