Count the numbers of occurrences of month in the column

sarinda100

New Member
Joined
Feb 12, 2024
Messages
2
Office Version
  1. 2021
Platform
  1. Windows
excel.png


I have been stuck on a formula. Can anyone help me please? january count is wrong
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Try with Sumproduct

Excel Formula:
=SUMPRODUCT(--(TEXT($A$2:$A$15,"mmm")=B2))

1707724721439.png
 
Upvote 1
a blank cell is seen as jan - Jan 1900 , hence why that is counting blank cells
you could use
=SUMPRODUCT((TEXT($A$2:$A$100,"mmm")=B2)*(YEAR($A$2:$A$100)=2024))
if you wanted to include the year , or just
=SUMPRODUCT((TEXT($A$2:$A$100,"mmm")=B2)*($A$2:$A$100<>""))
BUT that would count any year and just the Jan month


Book1
ABCD
1
21/1/24jan22
32/1/24feb11
43/1/24mar11
54/1/24apr11
6may00
71/1/24jun00
8jul00
9aug00
10sep00
11oct00
12nov00
13dec00
14
15
16
17
18
19
Sheet1
Cell Formulas
RangeFormula
C2:C13C2=SUMPRODUCT((TEXT($A$2:$A$100,"mmm")=B2)*(YEAR($A$2:$A$100)=2024))
D2:D13D2=SUMPRODUCT((TEXT($A$2:$A$100,"mmm")=B2)*($A$2:$A$100<>""))
 
Upvote 1
Solution

Forum statistics

Threads
1,215,152
Messages
6,123,323
Members
449,094
Latest member
Chestertim

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