Distinct date count in Column A for value in Column B

coffeeman12

New Member
Joined
Sep 19, 2020
Messages
8
Office Version
  1. 2016
Platform
  1. MacOS
I've tried multiple suggestions from different boards for this.

Here is what I'd like to do:

Col A Col B
1/1/2020 A
1/1/2020 A
1/4/2020 A
1/5/2020 A
1/1/2020 B
1/2/2020 B
1/4/2020 B
1/5/2020 B

I'd like to count the distinct dates for A in one cell, B in a different cell.

A would = 3
B would = 4

The closest I've come is:
=SUM(IF(FREQUENCY(MATCH(A1:A8,A1:A8,0),MATCH(A1:A8,A1:A8,0))>0,1))
This gives "4"

This formula doesn't allow you to specify whether you want to count the distinct dates for A or B (in column B).
It also does not work if you change the ranges to "A:A" in order to capture the entire column, to allow for changing numbers of rows.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi & welcome to MrExcel.
How about
+Fluff New.xlsm
ABCDE
1
201/01/2020AA3
301/01/2020AB4
404/01/2020A
505/01/2020A
601/01/2020B
702/01/2020B
804/01/2020B
905/01/2020B
10
Main
Cell Formulas
RangeFormula
E2:E3E2=SUM(--(FREQUENCY(IF($B$2:$B$9=D2,$A$2:$A$9),$A$2:$A$9)>0))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,016
Messages
6,122,700
Members
449,092
Latest member
snoom82

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