Formula to calculate unique number of days falls under a particular month.

Zee996

New Member
Joined
Nov 30, 2021
Messages
30
Office Version
  1. 365
Platform
  1. Windows
Hello,

Need help in determining the unique count of days within a specific month. Could you please help me with that? Thank you!

Here how my dataset looks like:

Date
29-01-2024​
03-12-2023​
Nov-23Dec-23Jan-24Feb-24Mar-24Apr-24
13-11-2023​
14-11-2023​
no. of days under the particular month.
15-12-2023​
17-11-2023​
09-11-2023​
06-01-2024​
08-01-2024​
01-11-2023​
01-03-2024​
01-11-2023​
01-11-2023​
01-04-2024​
01-11-2023​
01-11-2023​
01-11-2023​
02-11-2023​
01-11-2023​
01-11-2023​
01-11-2023​
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Here's one option:
Book2
ABCDEFGH
1Date01/11/202301/12/202301/01/202401/02/202401/03/202401/04/2024
201/11/20231423011
301/11/2023
401/11/2023
501/11/2023
601/11/2023
701/11/2023
801/11/2023
901/11/2023
1001/11/2023
1102/11/2023
1209/11/2023
1313/11/2023
1414/11/2023
1517/11/2023
1603/12/2023
1715/12/2023
1806/01/2024
1908/01/2024
2029/01/2024
2101/03/2024
2201/04/2024
Sheet1
Cell Formulas
RangeFormula
C2:H2C2=COUNTIFS($A$2:$A$22,">="&C$1,$A$2:$A$22,"<="&EOMONTH(C$1,0))
 
Upvote 0
Sorry, neglected that point.

Here's another option:
Book2
ABCDEFGH
1Date01/11/202301/12/202301/01/202401/02/202401/03/202401/04/2024
201/11/2023623011
301/11/2023
401/11/2023
501/11/2023
601/11/2023
701/11/2023
801/11/2023
901/11/2023
1001/11/2023
1102/11/2023
1209/11/2023
1313/11/2023
1414/11/2023
1517/11/2023
1603/12/2023
1715/12/2023
1806/01/2024
1908/01/2024
2029/01/2024
2101/03/2024
2201/04/2024
Sheet1
Cell Formulas
RangeFormula
C2:H2C2=LET(d,$A$2:$A$22,IFERROR(ROWS(UNIQUE(FILTER(d,(d>=C1)*(d<=EOMONTH(C1,0))))),0))
 
Upvote 1
Sorry, neglected that point.

Here's another option:
Book2
ABCDEFGH
1Date01/11/202301/12/202301/01/202401/02/202401/03/202401/04/2024
201/11/2023623011
301/11/2023
401/11/2023
501/11/2023
601/11/2023
701/11/2023
801/11/2023
901/11/2023
1001/11/2023
1102/11/2023
1209/11/2023
1313/11/2023
1414/11/2023
1517/11/2023
1603/12/2023
1715/12/2023
1806/01/2024
1908/01/2024
2029/01/2024
2101/03/2024
2201/04/2024
Sheet1
Cell Formulas
RangeFormula
C2:H2C2=LET(d,$A$2:$A$22,IFERROR(ROWS(UNIQUE(FILTER(d,(d>=C1)*(d<=EOMONTH(C1,0))))),0))
This works! Thank you so much.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,689
Members
449,117
Latest member
Aaagu

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