» Avoiding Errors When Counting Date Values That Meet Specified Criteria
CATEGORY - Excel Formula and Function
VERSION - All Microsoft Excel Versions
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)))
Date_____Hours Worked
1 Jan____8
4 Apr____5
3 Mar____4
5 Jan
8 Feb
10 Jan___2

Book Store:
Recommended Books:
- Preparing the Marketing Plan (Ama Marketing Toolbox Series New Edition)
- A Mathematician Plays the Stock Market
- AWAKEN THE GIANT WITHIN : HOW TO TAKE IMMEDIATE CONTROL OF YOUR MENTAL, EMOTIONAL, PHYSICAL AND FINANCIAL
- The Total Money Makeover. : A Proven Plan for Financial Fitness
- Flipping Properties: Generate Instant Cash Profits in Real Estate
- Financial Shenanigans : How to Detect Accounting Gimmicks & Fraud in Financial Reports
No comments have been submitted.

