Skip to main content

How to Countif by date/month/year and date range in Excel?

Author Kelly Last modified

For example, we have a membership roster with their birthdays, and now we are preparing to make birthday cards for these members. Before making the birthday cards, we have to count how many birthdays are in a specific month/year/date. Here I will guide you to Countif by date/month/year and date range with formulas in Excel with following methods:


Countif by specific month/year and date range with formulas in Excel

In this section, I will introduce some formulas to count birthdays by a certain month, year, or date range in Excel.

Countif by a certain month

Supposing you are going to count birthdays which are in a specific month of 8, you can enter below formula into a blank cell, and then press the Enter key.

=SUMPRODUCT(1*(MONTH(C3:C16)=G2))

Countif by a certain month

Notes:

In above formula, C3:C16 is the specified Date of Birth column you will count birthdays in, and G2 is the cell with the specific month number.

You can also apply this array formulas =SUM(IF(MONTH(B2:B15)=8,1)) (press Ctrl + Shift + Enter keys) to count birthdays by the specific month.

Countif by a certain year

If you need to count the birthdays by a certain year, says 1988, you can use one of below formulas as you need.

=SUMPRODUCT(1*(YEAR(C3:C16)=1988))
=SUM(IF(YEAR(B2:B15)=1988,1))

Note: The second formula an array formula. Please remember to press the Ctrl + Shift + Enter keys together after entering the formulas;

Countif by a certain date

If you need to count by a specific date (says 1992-8-16), please apply below formula, and press the Enter key.

=COUNTIF(B2:B15,"1992-8-16")

Countif by a certain date range

If you need to count if later/earlier than a specific date (says 1990-1-1), you can apply the below formulas:

=COUNTIF(B2:B15, ">" & "1990-1-1")
=COUNTIF(B2:B15, "<" & "1990-1-1")

To count if between two specific dates (says between 1988-1-1 and 1998-1-1), please apply below formula:

=COUNTIFS(B2:B15,">"&"1988-1-1",B2:B15,"<"&"1998-1-1")

Easily count by Fiscal year, half year, week number, or day of week in Excel

The PivotTable Special Time Grouping feature, provided by Kutools for Excel, is able to add a helper column to calculate the fiscal year, half year, week number, or day of week based on the specified date column, and let you easily count, sum, or average columns based on the calculated results in a new Pivot Table.


Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now

Countif by specified date, year, or date range in Excel

If you have Kutools for Excel installed, you can apply its Select Specific Cells utility to count the number of occurrences by specified date, year, or date range in Excel easily.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Select the birthday column you will count in, and click Kutools > Select > Select Specific Cells. See screenshot:
click Select Specific Cells feature of kutools

2. In the opening Select Specific Cells dialog box, please do as above screenshot shown:
(1) In the Selection type section, please check one option as you need. In our case, we check the Cell option;
(2) In the Specific type section, select the Greater than or equal to from the first drop down list, and then type the first date of the specified date range in right box; next select the Less than or equal to from the second drop down list, and type the last date of the specified date range in right box, and then check And option;
(3) Click the Ok button.
set options in the Select Specific Cells dialog box

3. Now a dialog box pops out and shows how many rows have been selected as below screenshot shown. Please click the OK button to close this dialog box.
a prompt box pops out and shows how many rows have been selected

Notes:
(1) For counting the number of occurrences by specified year, just specified the date range from the first date of this year to the last date of this year, such as from 1/1/1990 to 12/31/1990.
(2) For counting the number of occurrences by specified date, such as 9/14/1985, just specify the settings in the Select Specific Cells dialog box as below screenshot shown:
set options in the dialog box to count occurrences by specified date


Demo: Countif by date,weekday, month, year, or date range in Excel

 

Related articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!