Countif distindt

G

Guilherme Loretti

Hello. Please, is there some formula i can use to do count distinct of a
range of cells? This would help to eliminate duplicates when counting, I can
do this using the pivot table but it would be great to have this as formula
to avoid many steps. Thanks
 
P

Peo Sjoblom

One way

=SUMPRODUCT(--(A1:A10<>""),1/COUNTIF(A1:A10,A1:A10&""))


will do a distinct count in A1:A10
 
B

Bob Umlas, Excel MVP

Nice addendum to David Hager's original.

Peo Sjoblom said:
One way

=SUMPRODUCT(--(A1:A10<>""),1/COUNTIF(A1:A10,A1:A10&""))


will do a distinct count in A1:A10
 
Top