Skip to main content

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 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.


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?

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (15)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
=SUMIF($H$9:$H$39;">0") el carácter es ; no ,
This comment was minimized by the moderator on the site
Hello Sir, i need a solution/Formula to count negative numbers from different cells e.g i have three column of deposit (Current Account, Saving Account and Total Deposit) in 12 months and count in how many many months one branch miss the Current, saving and total budget. but when i use =countifs(C1,E1,F1.....,",0") but it only accept range not selected cell what will be the solution. thanks

e.g
This comment was minimized by the moderator on the site
Hello, i need a solution/Formula to count negative numbers from different cells e.g i have three column of deposit (Current Account, Saving Account and Total Deposit) in 12 months and count in how many many months one branch miss the Current, saving and total budget. but when i use =countifs(C1,E1,F1.....,",0") but it only accept range not selected cell what will be the solution. thanks
This comment was minimized by the moderator on the site
Gracias!! por fortuna escontre está página donde encontré Soluciones. 👍
Rated 5 out of 5
This comment was minimized by the moderator on the site
Bonjour à tous,

je suis novice en excel. Existe il une fonction qui calcule automatiquement la différence entre deux nombres en incluant soit - où + devant le résultat.:
exemple, 1735-1685 = +50. (je l'ai fait avec la fonction somme automatique, mais je n'ai pas le + devant le résultat.
Pouvez vous m'envoyer un exemple de la formule avec ces nombres
Cdlt
This comment was minimized by the moderator on the site
Hello, LYS
Normally, there isn't a function to sove your problem, but, you can apply the SUM function to get the results first, and then use the Format Cells feature to set +0;-0;0 for the numbers, please see the below screenshot:
https://www.extendoffice.com/images/stories/comments/comment-skyyang/doc-format-cells.png

Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Thank you!!! This worked like a charm for my bank's annoying single "amount" column.
This comment was minimized by the moderator on the site
Thanks a lot!
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
@Ferras,


=(COUNTIF(N18:N320,">0")+COUNTIF(N18:N320,"<0"))

Try it and let me know.
This comment was minimized by the moderator on the site
=COUNTIF(N18:N320,"<>0").....Works for me
This comment was minimized by the moderator on the site
how to change color of the cell automatically, according to profit and loss
This comment was minimized by the moderator on the site
How can I add only the numbers that will give me 0? Thank you
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations