counting occurences of a value in a range but not including 0's nor blanks
Hi,
I have a list that looks like
--A B C
2 a a 1
3 b b 2
4 c c 3
5 b
6 c
.
.
.
200
I need a formula that can be copied to the cells in column 'C' that counts the number of occurences of the values in the adjacent cell in column 'B', that returns 0 or no value at all, when the adjacent cell in column 'B' is blank or zero.
Thank you.
( I've tried =countif(value,array), It also counts blank cells :/ )
.
.
.
This one returns a 0 for blank adjacent cells
=IF(Cx="",0,IF(Cx>0,COUNTIF(named_range,Cx),""))
anyone has a formula that leaves Cx cell blank rather than returning 0? Thank you...
.
.
.
sorry... this one finally worked. simply changed the 0 return values to ""
=IF(Cx="","",IF(Cx>0,COUNTIF(named_range,Cx),""))
Last edited by virsojour; 07-05-2010 at 03:26 AM.
|