Counting >0 with Excel’s COUNTIF Function
Counting >0 with Excel’s COUNTIF Function. If you need to count the number of values greater than zero in a range of cells or list of values, you can do so easily using Excel’s COUNTIF function. This function is part of Excel’s statistical functions and can be used to count cells that meet a certain criteria.
How to Use Excel’s COUNTIF Function to Count Values Greater than Zero
For example, if you have a list of numbers ranging from -10 to 10 and you want to count the numbers that are greater than zero, you can follow these steps:
- In cell C1, type “=COUNTIF(” to begin the formula.
- In the range argument, specify the range of cells you want to count. For example, if your list of numbers is in cells A2 to A19, type “A2:A19”.
- Type a comma to move to the next argument.
- In the criteria argument, type “>0” to specify that you want to count cells greater than zero.
- Close the parentheses to complete the formula.
- Press Enter to see the result in cell C1.
The formula will return the number of cells in the range that meet the specified criteria, in this case, the number of cells greater than zero.
Using COUNTIFS to Count Greater than Zero and Less than a Specific Number
If you want to count cells that meet multiple criteria, such as being greater than zero and less than a specific number, you can use the COUNTIFS function instead of the COUNTIF function.
For example, if you want to count the number of cells in the range A2 to A19 that are greater than zero and less than 10, you can use the following formula:
=COUNTIFS(A2:A19,”>0″,A2:A19,”<10″)
In this formula, the first argument specifies the range of cells you want to count, and the subsequent arguments specify the criteria you want to apply. The formula will return the number of cells in the range that meet both criteria.