Count unique value appear based on date range

blader1989

New Member
Joined
May 6, 2021
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I'm looking for formular that can count unique value appear in range of date from my report, I have tried a lot of method but it could not result as my desired. So it would be great from your help to solve my problem.

Below is my example table and desired output I would to have: Consider that I receive the report from a server then I want to count the unique value appear in date range, if this value appear (assump value X appear on 25 and 26 March 2025, it will count as 2 not one EVEN THOUGH it appear 2 times on 25 March 2025).

Book1
AB
1DateValue
225/03/2025X
325/03/2025X
426/03/2025X
525/03/2025Y
625/03/2025Y
727/03/2025Y
826/03/2025Y
926/03/2025Z
1027/03/2025Z
1125/03/2025Z
12
13Desired output as below
14ValueCount
15X2
16Y3
17Z3
Sheet4
Cell Formulas
RangeFormula
A15:A17A15=UNIQUE(B2:B11)
Dynamic array formulas.


Thank you so much, your help will be much appreciated!!!
 
Hello,

You can try the below to get the desired results :
Book4
AB
1DateValue
225/03/2025X
325/03/2025X
426/03/2025X
525/03/2025Y
625/03/2025Y
727/03/2025Y
826/03/2025Y
926/03/2025Z
1027/03/2025Z
1125/03/2025Z
12
13Desired output as below
14ValueCount
15X2
16Y3
17Z3
Sheet1
Cell Formulas
RangeFormula
A15:A17A15=UNIQUE(B2:B11)
B15:B17B15=SUMPRODUCT(--(CHOOSECOLS(UNIQUE($A$2:$B$11),2)=A15))
Dynamic array formulas.
 
Upvote 1
工作簿1
ABCD
1DateValue
22025-3-25X
32025-3-25X
42025-3-26X
52025-3-25Y
62025-3-25Y
72025-3-27Y
82025-3-26Y
92025-3-26Z
102025-3-27Z
112025-3-25Z
12
13Desired output as below
14ValueCount
15X22
16Y33
17Z33
18
Sheet1
Cell Formulas
RangeFormula
A15:A17A15=UNIQUE(B2:B11)
C15:C17C15=SUM(N(UNIQUE(A$2:B$11)=A15))
Dynamic array formulas.
 
Upvote 1
Solution
工作簿1
ABC
1DateValue
22025-3-25X
32025-3-25X
42025-3-26X
52025-3-25Y
62025-3-25Y
72025-3-27Y
82025-3-26Y
92025-3-26Z
102025-3-27Z
112025-3-25Z
12
13Desired output as below
14ValueCount
15X2
16Y3
17Z3
18
Sheet1
Cell Formulas
RangeFormula
A15:B17A15=GROUPBY(B2:B11,A2:A11,LAMBDA(x,ROWS(UNIQUE(x))),,0)
Dynamic array formulas.
 
Upvote 1

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