The countif function doesn't seem to work when I'm not applying it to a
range. Well, I am applying it to a range, but it is not a continuous range.
i.e. not A1:A8, but rather A1,A3,A6,A8. How do I make the formula work
without a continuous range? Thanks.
"SteveG" wrote:
I think I got this straight. In one instance, you want to count the
number of cells in a range that are greater than zero and divide it by
the total number of cells in the range.
=COUNTIF(A1:A8,"0")/SUM(COUNTBLANK(A1:A8)+COUNTIF(A1:A8,"0"))
A1:A8 being the range.
Then you also want to average the values from the range A1:A8 if they
are greater than zero?
=AVERAGE(IF(A1:A80,A1:A8,FALSE))
This is an array so you need to commit with Ctrl-Shift-Enter which
results in the formula being enclosed in curly brackets like.
{=AVERAGE(IF(A1:A80,A1:A8,FALSE))}
HTH
Steve
--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=499913