count a group of numbers but do not count duplicates

L

Lisaml

I need to count a column of numbers but do not want to count the duplicate
numbers. How do I do this?
 
M

Myrna Larson

I'm not sure whether you want to count the number of unique entries or to sum
them. Assuming it's the former:

=SUM(1/COUNTIF(A1:A20,A1:A20))

entered as an array formula with CTRL+SHIFT+ENTER

If you want to sum the first occurrence of each unique number, use a "helper"
column (say C) with this formula, copied down as far as needed.

=COUNTIF($A$1:A1,A1)

Then use =SUMIF(C1:C20,1,A1:A20)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top