Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to count / sum only positive or negative numbers in Excel?

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?

Count only positive or negative numbers in a range with formulas

Sum only positive or negative numbers in a range with formulas

Count / Sum / Average only positive or negative numbers with Kutools for Excel


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!


Count only positive or negative numbers in a range with formulas


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:

doc-count-positives1

2. Then press Enter key, and all of the positive numbers have been counted and the result is shown in the cell. See screenshot:

doc-count-positives1

Notes:

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.


Sum only positive or negative numbers in a range with formulas

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:

doc-count-positives1

2. Then press Enter key, and just all of the positive numbers have been added up.

doc-count-positives1

Notes:

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.


Count / Sum / Average only positive or negative numbers with Kutools for Excel

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:

doc-count-positives1

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:

doc-count-positives1

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:

doc-count-positives1

(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:

doc-count-positives1

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:

doc-count-positives1

Click to know more about this Select Specific Cells feature.

 Download and free trial Kutools for Excel Now !


Demo: Count / Sum / Average only positive or negative numbers with Kutools for Excel

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!


Related articles:

How to sum / count bold numbers in a range of cells in Excel?

How to count the number of error cells / non error cells in Excel?



Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 300 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Fernando · 4 months ago
    How to use the Countif formula to count Positive AND Negative values but exclude ZEROS from the counting?

    For example (data below):
    1
    3
    0
    -5
    0
    -1
    7

    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?

    Thanks,
    Fernando
    • To post as a guest, your comment is unpublished.
      Eoin · 4 months ago
      =COUNTIF(N18:N320,"<>0").....Works for me
  • To post as a guest, your comment is unpublished.
    pradeep · 1 years ago
    how to change color of the cell automatically, according to profit and loss
  • To post as a guest, your comment is unpublished.
    adnan · 3 years ago
    How can I add only the numbers that will give me 0?

    Thank you
  • To post as a guest, your comment is unpublished.
    Smithd413 · 3 years ago
    Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You obviously know what youre talking about, why throw away your intelligence on just posting videos to your site when you could be giving us something enlightening to read? caddbgggbkdkbage
  • To post as a guest, your comment is unpublished.
    Mohammed · 3 years ago
    thank alot have a nice life