For example (data below):
The Total counting that I am expecting is equal to 5.
I thought the formula should be like =COUNTIF(N18:N320,"<>0")
But it is not working in the way that I imagined.
Can anyone help please?
Normally, it is easy for us to sum or count a range of data in a worksheet, but here, I want to count or sum positive or negative numbers only. Are there any effective ways for solving this problem?
Change or convert positive numbers to negatives and vice versa:
With Kutools for Excel’s Change Sign of Values utility, you can change the positive numbers to negative or vice versa, reverse the sign of numbers, fix trailing negative signs, and so on.
Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!
Here, the COUNTIF function can help you quickly to count how many positive numbers or negative numbers in a range.
1. To count only the positive values, in a blank cell, please enter this formula =COUNTIF($A$1:$D$7,">0") into it, see screenshot:
2. Then press Enter key, and all of the positive numbers have been counted and the result is shown in the cell. See screenshot:
1. If you want to count the number of negative values only, please apply this formula =COUNTIF($A$1:$D$7,"<0").
2. And in the above formula, A1:D7 is the data range that you want to use.
In Excel, the SUMIF function can help you to add up only the positive values or negative values. You can apply this formula as this:
1. Type this formula =SUMIF($A$1:$D$7,">0") into a blank cell, see screenshot:
2. Then press Enter key, and just all of the positive numbers have been added up.
1. To sum all negative numbers only in a range, please use this formula =SUMIF($A$1:$D$7,"<0").
2. In the above formula, A1:D7 is the data range that you want to use.
As we all known, if we can select the positive or negative cells, the calculations such as Count, Sum and Average will be displayed in the status bar. Kutools for Excel’s Select Specific Cells function may help you quickly select the negative or positive values at once.
|Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.|
After installing Kutools for Excel, please do as follows:
1. Select the data range that you want to use.
2. Click Kutools > Select > Select Specific Cells, see screenshot:
3. In the Select Specific Cells dialog box, please do as following options:
(1.) If you want to count and sum only the positive values, please select Cell under the Selection type, and choose Greater than from the Specific type drop down, then enter 0 into the text box, see screenshot:
Click OK button, all the positive numbers have been selected at once, in the right hand corner of the status bar, the calculations of count, sum, average have been displayed, see screenshot:
(2.) To count or sum only the negative numbers of the selected range, please select Cell under the Selection type, and choose Less than from the Specific type drop down, then enter 0 into the text box, see screenshot:
Click OK button, all the negative numbers have been selected and the calculations of count, sum and average have been displayed in the status bar, see screenshot:
Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.
Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!
300 New Features for Excel, Make Excel Much Easy and Powerful: