# count current months occurrences

#### redspanna

##### Well-known Member
Hello all

as per excel sheet example below, I would like a formula that will check down the dates in column A and count the current months occurrences.

Running (version 2).xlsb.xlsm
ABCD
111-Jan-21Apr 212
215-Jan-21Mar 214
317-Jan-21Feb 212
418-Feb-21Jan 213
519-Feb-21
602-Mar-21
704-Mar-21
806-Mar-21
911-Mar-21
1001-Apr-21
1104-Apr-21
12
Sheet1
Cell Formulas
RangeFormula
C1C1=TEXT(TODAY(),"Mmm yy")
C2C2=TEXT(TODAY()-30,"Mmm yy")
C3C3=TEXT(TODAY()-65,"Mmm yy")
C4C4=TEXT(TODAY()-90,"Mmm yy")

So the formula in cell C1 shows current month is Apr21 and I'd like a formula then placed into cell D1 to give the result shown in D1

### Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

#### Fluff

##### MrExcel MVP, Moderator
+Fluff 1.xlsm
ABCD
1
211/01/202101/04/20212
315/01/202101/03/20214
417/01/202101/02/20212
518/02/202101/01/20213
619/02/2021
702/03/2021
804/03/2021
906/03/2021
1011/03/2021
1101/04/2021
1204/04/2021
13
Main
Cell Formulas
RangeFormula
C2C2=EOMONTH(TODAY(),-1)+1
D2:D5D2=COUNTIFS(A:A,">="&C2,A:A,"<="&EOMONTH(C2,0))
C3C3=EOMONTH(TODAY(),-2)+1
C4C4=EOMONTH(TODAY(),-3)+1
C5C5=EOMONTH(TODAY(),-4)+1

#### redspanna

##### Well-known Member
+Fluff 1.xlsm
ABCD
1
211/01/202101/04/20212
315/01/202101/03/20214
417/01/202101/02/20212
518/02/202101/01/20213
619/02/2021
702/03/2021
804/03/2021
906/03/2021
1011/03/2021
1101/04/2021
1204/04/2021
13
Main
Cell Formulas
RangeFormula
C2C2=EOMONTH(TODAY(),-1)+1
D2:D5D2=COUNTIFS(A:A,">="&C2,A:A,"<="&EOMONTH(C2,0))
C3C3=EOMONTH(TODAY(),-2)+1
C4C4=EOMONTH(TODAY(),-3)+1
C5C5=EOMONTH(TODAY(),-4)+1

Perfect - thanks so much

#### Fluff

##### MrExcel MVP, Moderator
You're welcome & thanks for the feedback.

Replies
0
Views
36
Replies
3
Views
493
Replies
11
Views
388
Replies
4
Views
94
Replies
3
Views
198

1,133,628
Messages
5,659,947
Members
418,538
Latest member
alc51103

### 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.

### Which adblocker are you using?

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

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