Please see image below, I am looking to populate cells G8-G12 with a value of how many times the day appears in Column B and has a unique date in Column A. So as an example, Wednesday would count 2 as it appears on 28/02/2024 and 06/03/2024.
How do I do this?
I've tried SUMPRODUCT and COUNTIFS but not managed to get what I wanted, for example I used
(=SUMPRODUCT((1/COUNTIFS(A2:A12,A2:A12,B2:B12,F8)))
in cell G8 but it's incorrect.


Here is what Older versions of Excel need to use:
Or, Using Newer Versions of Excel:
Also using
Pivot Tableto get unique distinct count one needs to add the data in theData Modelto apply the summarization withDistinct Counts-- the feature is available inWindows Excel 2013+andExcel 365 (Windows)To use follow the steps:
Table_1InsertTab -> Click onPivot Table--> TheTable/Rangewill shows asTable_1, Click onNew WorksheetorExisting Worksheetas per your choice, --> If latter select the cell location and click onAdd this data the Data Model.Pivot TableFields Pane appears, place theDayinRowsArea andDateinValuesarea,Summarize Values By-->Distinct Count.