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
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
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:

Watch MrExcel Video

Forum statistics

Threads
1,122,162
Messages
5,594,615
Members
413,917
Latest member
devansh02

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
Top