COUNTIF function

Another simple one and useful ;)

A B
1  Green =COUNTIF(A1,A$1$:A$6$)
2  White =COUNTIF(A2,A$1$:A$6$) 
3  Pink=COUNTIF(A3,A$1$:A$6$)
 4  White=COUNTIF(A4,A$1$:A$6$)
5 Pink=COUNTIF(A5,A$1$:A$6$)
6 Pink=COUNTIF(A6,A$1$:A$6$)

And the answer is...
A B
1  Green  1
2  White  2 
3  Pink 3 
 4  White 2 
5 Pink 3 
6 Pink 3 


Or we can just check one value:
A B
1  Pink =COUNTIF("Pink",A$1$:A$6$)

No comments:

Post a Comment