Simplistic Question


Posted by Brendon K. on October 13, 2001 11:01 AM

I was wondering if there's a way to check for a certain value (ie: x > 0) within a range to increment a single cell's value using a conditional statement. I can't seem to figure it out. If I were writing this in Visual Basic, C++, Java, or anything else it'd be simplistic - however I'm limited in the amount of tools I have at hand.

Let's say I have a column:

0
1
22
-13
-22
3

I'd like to count how many of the values in that column are greater than zero and place the value in a single cell. Adversely, to count how many are less than or equal to zero and place that value in another cell. I know this has got to be simple, but I just can't figure it out. Help? :)

Respectfully,
~ Brendon Kozlowski

Posted by CPU Nut on October 13, 2001 11:16 AM

=COUNTIF(A1:A6,">0")

The formula will count anything above 0

Or you can change it to count less than zero or any other number for that matter. I hope this is what you were looking for.

CPU Nut



Posted by Brendon K. on October 14, 2001 5:14 PM

It's pretty much what I was looking for. I can adapt it to use it the way I'd like. Thanks for your time. It's very much appreciated. =)