Excel Formulas - Count number of cells that contain positive or negative numbers
Count number of cells containing negative numbers
Syntax of used function(s)
COUNTIF(criteria_range, criteria)
The COUNTIF function is used to count the number of cells that meet a certain criteria.
Explanation
To count number of negative numbers within a range of cells the COUNTIF function can be used.
Formula
=COUNTIF(TestData,D8)
How this formula works
In the above example the COUNTIF function search for negative number within the range assigned by the name Testdate and counts if matches.
A criteria variable have been used in this example.
Count number of cells that contain positive numbers
Explanation
To count number of positive numbers within a range of cells the COUNTIF function can be used.
Formula
=COUNTIF(TestData,D8)
How this formula works
In the above example the COUNTIF function search for positive number within the range assigned by the name Testdate and counts if matches.
A criteria variable D8 have been used in this example.
Count number of cells that contain the numbers above -60
Formula
=COUNTIF(TestData,D8)
How this formula works
In the above example the COUNTIF function search for numbers is greater than -60 within the range and counts if matches.
Here D8 is the criteria variable contain the criterai >-60.
Count number of cells that contain positive numbers and zero
Formula
=COUNTIF(TestData,D8)
How this formula works
In the above example the COUNTIF function search for numbers is greater than equal to 0 within the range and counts if matches. Here D8 is the criteria variable contain the criterai >=0.
Previous: Excel Formulas - Count cells that contain any of the specified string
Next:
Excel Formulas - Count number of cells containing even or odd numbers
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/excel/formulas/count/count-no-of-cells-that-contain-positive-or-negative-numbers.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics