MS Excel - count number of different days for a given month and year il a list of dates
<p>In MS Excel, I've a list of different dates in a column 
I'd like to count the number of different days (day month year) in the list for a given year and month</p>

<p>I'd like to have a formula and not using a pivot table</p>

<p><strong>Sample</strong></p>

<p><a href="https://i.stack.imgur.com/Ak5ig.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ak5ig.png" alt="enter image description here"></a></p>

<p>I found a partial solution</p>

<p>=sumprod(1/count.if(A1:A4;A1:A5))</p>

<p>=sumprod(1/count.if(A6:A17;A6:A17))</p>

<p>But here I've to define the start and end of the month in the selection it doesn't work for the whole column (A:A) or when months are mixed</p>