Count if different formula

  • Thread starter Thread starter dayton
  • Start date Start date
D

dayton

I need a formula to count the number of different cells in a column.

Example
A1 = 25A99
A2 = 45C22
A3 = 25A99
A4 = 3195A
A5 = 3195A
A6 = 8621E

The total would equal 4.Four different values in the columns.
T.I.A.
 
One way:

Using your example, enter this formual in B1 and copy down to B6:

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

This will result in

A B
1 25A99 1
2 45C22 1
3 25A99 2
4 3195A 1
5 3195A 2
6 8621E 1

You can then use this formula to get the result you're after:

=SUMIF(B1:B6,1)

-Dave
 
Back
Top