Excel515

New Member
Joined
Mar 16, 2015
Messages
2
So I have multiple month-end dates in a column. I have the below formula which counts the number of distinct dates and that works, but as I add more month-ends throughout the year I keep having to adjust the below formula. I tried doing =SUMPRODUCT(1/COUNTIF(B:B,B:B)) but that seems to break it. So I was just wondering if there is a better way to get that distinct count and make the formula dynamic so to speak? Any help would be much appreciated :)


Example Formula currently: =SUMPRODUCT(1/COUNTIF($B$2:$B$471,$B$2:$B$471))
Column B
1/31/2019
1/31/2019
1/31/2019
2/28/2019
2/28/2019
3/31/2019
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
maybe use Count Distinct in PivotTable with Data Model

datedateDistinct Count of date
31/01/2019​
31/01/2019​
1​
31/01/2019​
28/02/2019​
1​
31/01/2019​
31/03/2019​
1​
28/02/2019​
Grand Total
3
28/02/2019​
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,727
Messages
6,126,521
Members
449,316
Latest member
sravya

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