Count the number of entries per month during the year

philb99

Active Member
Joined
Feb 3, 2014
Messages
426
Office Version
  1. 2013
Platform
  1. Windows
I have member information on a line with a date recorded - I am trying to count the number of entries for each month, ie 2 in Jan, 3 in Feb etc

If some one could help please

 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hello, maybe something like for January and so on:

Excel Formula:
=SUMPRODUCT(--(MONTH(A2:A26)=1))
 
Upvote 0
Hello, maybe something like for January and so on:

Excel Formula:
=SUMPRODUCT(--(MONTH(A2:A26)=1))
Many thanks, I presume that I would to do the formula 12 times.

Do you know of any way the information could all filter into the respective months at once
 
Upvote 0
You can use a Pivot table like this,

Move date to Rows field and it will automatically group to Year, Month and Quarters, just keep months in Rows field and remove others, then again move month to Value field

drop box query5.xlsx
ABCDEFG
1Date
21/2/2024Months (Date)Count of Months (Date)
31/26/2024Jan2
43/3/2024Mar4
53/4/2024Apr3
63/14/2024May2
73/29/2024Jun4
84/5/2024Jul3
94/6/2024Aug2
104/28/2024Sep2
115/13/2024Oct1
125/29/2024Dec2
136/3/2024Grand Total25
146/4/2024
156/13/2024
166/29/2024
177/5/2024
187/14/2024
197/29/2024
208/14/2024
218/29/2024
229/14/2024
239/29/2024
2410/15/2024
2512/1/2024
2612/2/2024
27
Sheet1


1734034856304.png
 
Last edited:
Upvote 0
You can use a Pivot table like this,

Move date to Rows field and it will automatically group to Year, Month and Quarters, just keep months in Rows field and remove others, then again move month to Value field

drop box query5.xlsx
ABCDEFG
1Date
21/2/2024Months (Date)Count of Months (Date)
31/26/2024Jan2
43/3/2024Mar4
53/4/2024Apr3
63/14/2024May2
73/29/2024Jun4
84/5/2024Jul3
94/6/2024Aug2
104/28/2024Sep2
115/13/2024Oct1
125/29/2024Dec2
136/3/2024Grand Total25
146/4/2024
156/13/2024
166/29/2024
177/5/2024
187/14/2024
197/29/2024
208/14/2024
218/29/2024
229/14/2024
239/29/2024
2410/15/2024
2512/1/2024
2612/2/2024
27
Sheet1


View attachment 120312
Sorry - where have the months come from, when I put Dates in Rows, I just the list of days = 1 with a Total = 25
 
Upvote 0
If your dates are not grouping then go to PivotTable Analyze and go to group field


1734038621628.png





Then select Months

1734038652426.png
 
Upvote 0
Solution
Many thanks, I presume that I would to do the formula 12 times.

Do you know of any way the information could all filter into the respective months at once
You can use this formula and copy it down 12 times...
=SUMPRODUCT(0+(MONTH(A$2:A$15)=ROWS(A$2:A2)))
 
Upvote 0
Here's an alternative with Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Extracted Month Name" = Table.TransformColumns(Source, {{"Date", each Date.MonthName(_), type text}}),
    #"Grouped Rows" = Table.Group(#"Extracted Month Name", {"Date"}, {{"Count", each Table.RowCount(_), Int64.Type}})
in
    #"Grouped Rows"

drop box query5.xlsx
ABCD
1DateDateCount
21/2/2024January2
31/26/2024March4
43/3/2024April3
53/4/2024May2
63/14/2024June4
73/29/2024July3
84/5/2024August2
94/6/2024September2
104/28/2024October1
115/13/2024December2
125/29/2024
136/3/2024
146/4/2024
156/13/2024
166/29/2024
177/5/2024
187/14/2024
197/29/2024
208/14/2024
218/29/2024
229/14/2024
239/29/2024
2410/15/2024
2512/1/2024
2612/2/2024
Sheet1
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top