Skip to main content

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

Author: Xiaoyang Last Modified: 2024-07-03

Summing or counting data in a worksheet is typically straightforward, but sometimes you may need to specifically target positive or negative numbers. Are there efficient methods to achieve this? This guide will explore practical solutions to help you selectively sum or count only the positive or negative numbers in your data set.


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:
  • If you want to count the number of negative values only, please apply this formula =COUNTIF($A$1:$D$7,"<0").
  • 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:
  • To sum all negative numbers only in a range, please use this formula =SUMIF($A$1:$D$7,"<0").
  • In the above formula, A1:D7 is the data range that you want to use.

Using Kutools AI to count and sum only positive or negative numbers

Kutools AI saves time and effort by making it easy to get results with just one command, without using formulas.

After installing Kutools for Excel, go to the Kutools AI tab and select AI Aide in the AI group. Then Kutools AI Aide (Preview) pane will appear on the right side of the worksheet. To use it, follow these steps:

  1. Select the range of numbers you wish to analyze.
  2. In the Kutools AI Aide pane, enter the command describing your desired operation.
    Here I instructed Kutools AI: Please count the number of positive cells in the selection and generate the result. You may need to adjust the command's keywords to suit your specific needs.
  3. Click the Send button or press Enter.
  4. Kutools AI will process the command and provide feedback. Click the Execute button to see a dialog box that displays the results.
Notes:
  • To interact with Kutools AI for specific tasks:
    • Count negative cells: Say, Please count the number of negative cells in the selection and generate the result.
    • Sum positive cells: Say, Please sum the number of positive cells in the selection and generate the result.
    • Sum negative cells: Say, Please sum the number of negative cells in the selection and generate the result.
  • Kutools AI can do much more than just basic calculations as above — it can generate formulas, analyze data, explain formulas and so on based on your commands. Explore the full capabilities of Kutools AI with a 30-day free trial and discover how it can streamline your Excel tasks. Download now to start simplifying your data management!

Whether through traditional formulas or advanced tools like Kutools AI, you can efficiently manage and analyze data involving positive or negative numbers. Practice these methods to become proficient in making the most out of Excel's robust analytical features, ensuring your data works for you in the most effective way possible. For those eager to delve deeper into Excel's capabilities, our website boasts a wealth of tutorials. Discover more Excel tips and tricks here.


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!
There are no comments posted here yet
Load More
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations