Can I count how many numbers in a list, excluding duplicates

THEBAGSTER

New Member
Joined
Feb 13, 2007
Messages
2
for example

there are 30 numbers listed below:
170977
171034
170977
170977
170959
171157
171157
171157
171157
171157
171157
171559
171559
171559
170584
170584
170584
170977
170959
170977
170977
170977
170959
169804
168868
168878
168878
169988
169988
170355


there are 16 actual different numbers (excluding the duplcates)

Can I count the number of different numbers in a list using a formula in excel 2000??
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
This is a little crude but if you assume that your data is in column A and in ascending order, then in cell B1 put "1" and in B2 put "=IF(A2=A1,0,1)" then copy this down the rest of column B then sum column B.
 
Upvote 0
thanks Peter,

I deliberately miscounted to make sure people were alert!!!

That works perfectly...

The Bagster
sunny England.
 
Upvote 0
This will work also ( entered as array formula)
=IF(COUNTIF($A$1:A1,A1)=1,A1,"")

and YES Peter there are only 11
 
Upvote 0
This will work also ( entered as array formula)
=IF(COUNTIF($A$1:A1,A1)=1,A1,"")

and YES Peter there are only 11
I can't see that this will count the unique entries (that is, produce the result 11 in this case). Also, I can't see what entering it as an array formula achieves. If entered as an ordinary formula in, say, column B and copied down it will list the unique entries, but not count them.
 
Upvote 0
Yes you're right, this formula only lits the unique entries
This one will count them :=SUM(N(FREQUENCY(A1:A10,A1:A10)>0))
(only numbers and blank cells are counted)
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,399
Members
449,446
Latest member
CodeCybear

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