» Counting the Number of Dates with Matching Month Criteria
CATEGORY - Excel Counting
VERSION - All Microsoft Excel Versions
Problem:The following formula was written to count the number of dates in column A that matched the month criteria in cell B2.
=COUNTIF(MONTH(A2:A6),B2)
However, on entry, an error occurred and the formula could not be used.
Solution 1:
Use the SUMPRODUCT and MONTH functions as shown in the following formula:
=SUMPRODUCT(--(MONTH(A2:A6)=B2))
Solution 2:
Use the SUM, IF, and MONTH functions as shown in the following Array formula:
{=SUM(IF(MONTH(A2:A6)=B2,1))}
Book Store:
Recommended Books:
- Rich Dad's Guide to Investing: What the Rich Invest in, That the Poor and the Middle Class Do Not!
- Financial Modeling - 2nd Edition
- Keys to Reading an Annual Report (Barron's Business Keys)
- Windows XP Annoyances
- Microsoft Outlook Version 2002 Step by Step (With CD-ROM)
- The Fall of Advertising and the Rise of PR
No comments have been submitted.

