I have a column which contains dates, I want to use the countif function to count the dates in a certain month. I can’t seem to get it working right. Can somebody suggest something
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Countif for dates between (xp)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Countif for dates between (xp)
- This topic has 3 replies, 4 voices, and was last updated 22 years, 11 months ago.
Viewing 2 reply threadsAuthorReplies-
H. Legare Coleman
AskWoody PlusJuly 9, 2002 at 2:55 pm #599986If the dates are in A1:A25, then the following array formula (hold down Shift+ Ctrl when you enter it) will count the number that are in January:
=SUM((MONTH(A1:A25)=1)*(A1:A25""))
To count February, change the “=1” to “=2”, or change the “=1” to “=” and a cell reference where you will enter the month number.
-
WSdcardno
AskWoody LoungerJuly 9, 2002 at 3:08 pm #600007I can’t help if you are committed to using “countif” – but if you are willing to use an array function, this will work:
Assuming your column of dates is in column A, extending from A2 to A78, and you want to be able to count the number that occur in May, June, November, etc – place a number from 1-12, representing the month (January – December) in cell A80. In cell B80, enter the formula:
=SUM(IF(MONTH(A$2:A$78) = A80,1,0))
This will be an array formula, and must be entered by hitting ctrl-shift-enter. Excel will insert braces around the formula to indicate that it is an array formula. If you need to see the count for more than one month at a time, drag to copy the formula down the B column, and then put in the months you need. If required, you can have twelve copies of the formula and show the count for all twelve months at once. The referenced range for the formula (A2:A78) can be changed either by editing the formula bar or by dragging an outline – just remember to enter the formula by ctrl-shift-enter.
An alternate formula woudl be:
=SUM((MONTH(A$2:A$78) = A81)*1)
This might evaluate faster, but I doubt that the difference would be noticeable
If you are dealing with more than one year you can edit the criteria to use an “AND” function to test for the value in the range to be more than a particular starting date and less than an ending date, as well – unless you want to aggregate May 02 with May 01
-
WSJohnBF
AskWoody Lounger
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Cyberattack on some Washington Post journalists’ email accounts
by
Bob99
3 hours, 34 minutes ago -
Tools to support internet discussions
by
Kathy Stevens
6 hours, 18 minutes ago -
How get Group Policy to allow specific Driver to download?
by
Tex265
4 hours, 38 minutes ago -
AI is good sometimes
by
Susan Bradley
6 hours, 40 minutes ago -
Mozilla quietly tests Perplexity AI as a New Firefox Search Option
by
Alex5723
11 hours, 59 minutes ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
1 day, 6 hours ago -
June KB5060842 update broke DHCP server service
by
Alex5723
1 day, 5 hours ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
1 day, 9 hours ago -
Excessive security alerts
by
WSSebastian42
20 minutes ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
1 day, 19 hours ago -
Ben’s excellent adventure with Linux
by
Ben Myers
27 minutes ago -
Seconds are back in Windows 10!
by
Susan Bradley
1 day, 6 hours ago -
WebBrowserPassView — Take inventory of your stored passwords
by
Deanna McElveen
11 minutes ago -
OS news from WWDC 2025
by
Will Fastie
10 hours, 5 minutes ago -
Need help with graphics…
by
WSBatBytes
14 hours, 19 minutes ago -
AMD : Out of Bounds (OOB) read vulnerability in TPM 2.0 CVE-2025-2884
by
Alex5723
2 days, 10 hours ago -
Totally remove or disable BitLocker
by
CWBillow
1 day, 9 hours ago -
Windows 10 gets 6 years of ESU?
by
n0ads
1 day, 12 hours ago -
Apple, Google stores still offer China-based VPNs, report says
by
Nibbled To Death By Ducks
2 days, 21 hours ago -
Search Forums only bring up my posts?
by
Deo
5 hours, 53 minutes ago -
Windows Spotlight broken on Enterprise and Pro for Workstations?
by
steeviebops
3 days, 8 hours ago -
Denmark wants to dump Microsoft for Linux + LibreOffice
by
Alex5723
3 days, 1 hour ago -
How to get Microsoft Defender to honor Group Policy Setting
by
Ralph
3 days, 9 hours ago -
Apple : Paragon’s iOS Mercenary Spyware Finds Journalists Target
by
Alex5723
3 days, 19 hours ago -
Music : The Rose Room – It’s Been A Long, Long Time album
by
Alex5723
3 days, 20 hours ago -
Disengage Bitlocker
by
CWBillow
3 days, 10 hours ago -
Mac Mini M2 Service Program for No Power Issue
by
Alex5723
3 days, 22 hours ago -
New Win 11 Pro Geekom Setup questions
by
Deo
5 hours, 41 minutes ago -
Windows 11 Insider Preview build 26200.5651 released to DEV
by
joep517
4 days, 6 hours ago -
Windows 11 Insider Preview build 26120.4441 (24H2) released to BETA
by
joep517
4 days, 6 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.