Unique count formula?

kins

Board Regular
Joined
Jul 26, 2010
Messages
157
I need a formula that does a unique could, in a sense. For example:
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
A1 Smith123
A2 Smith123
A3 Barker123
A4 Barker123
<o:p> </o:p>
Formula here (a5) to calculate and bring back a figure of 2 – because there are only 2 unique values.
I know how to use a unique filter but I need a formula to count the number of cells.
<o:p> </o:p>
I hope I’ve explained myself OK.
<o:p> </o:p>
Thanks in advance.
<o:p> </o:p>
Kins
Kins
 

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.
I need a formula that does a unique could, in a sense. For example:
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
A1 Smith123
A2 Smith123
A3 Barker123
A4 Barker123
<o:p></o:p>
Formula here (a5) to calculate and bring back a figure of 2 – because there are only 2 unique values.
I know how to use a unique filter but I need a formula to count the number of cells.
<o:p></o:p>
I hope I’ve explained myself OK.
<o:p></o:p>
Thanks in advance.
<o:p></o:p>
Kins
Kins

Control+shift+enter, not just enter:

=SUM(IF(FREQUENCY(IF(A1:A4<>"",MATCH("~"&A1:A4,A1:A4&"",0)),ROW(A1:A4)-ROW(A1)+1),1))

Most alternatives are mentioned here:

http://www.mrexcel.com/forum/showthread.php?t=292473
 
Upvote 0
try

=COUNT(FREQUENCY(A1:A4,0))

where B1 is a reference to a blank cell

edit - doesn't work - thought it was too good to be true.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,551
Members
452,927
Latest member
rows and columns

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