counting

C

chiapas77

I need help in getting excel to count the number of different numbe
values in a specified range of cells across a row. example:
1 1 2 should return 2
0 1 2 should return 3
2 2 2 should return 0

Can anyone help? thanks
 
K

Ken Johnson

Hi,
try =SUMPRODUCT(1/COUNTIF(A1:C1,A1:C1)) if your values are in A1:C1
then fill down.
Ken Johnson
PS I think you meant 2 2 2 should return 1, if not then this is not the
solution you are after.
 
Top