How to Count unique values in a single column

Twinkievizzio11

New Member
Joined
Apr 27, 2017
Messages
30
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello,

What formula can I use to count unique values in a single column located on a worksheet named "Prior"?

Example:
Worksheet name ""prior" column D has the following information which is in text format

11111
22222
11111
33333
33333
44444
55555
11111
55555

I need a formula that will count the number f unique values totaling 5

Please help!

Thank you
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Try
=SUMPRODUCT(1/COUNTIF(D2:D10,D2:D10))
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
Id also like to add into this formula If Column C equals the reference cell C3 then count the unique values in Column D

Example:

Cell C3 = 20181

Column C Column D
20181 11111
20182 22222
20181 22222
20182 33333
20183 11111
20181 22222


Result should be 2.

Thank you!
 
Upvote 0
How about

Excel 2013/2016
CD
3201812
4
52018111111
62018222222
72018122222
82018233333
92018211111
102018122222
Sheet6
Cell Formulas
RangeFormula
D3{=SUM(--(FREQUENCY(IF(C5:C10=C3,MATCH(D5:D10,D5:D10,0)),ROW(D5:D10)-ROW(D5)+1)>0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Make sure that the value in C3 is exactly the same as those in C5:C10
if C5:c10 is numbers stored as text, then C3 must be as well.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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