We’re going to use a sample dataset as an example. The following dataset represents the Profit/Loss in the first 5 Days of January of a store.
Download the Practice Workbook
4 Simple and Effective Ways in Excel to Sum Positive Numbers Only
Method 1 – Sum Only Positive Numbers by Applying the SUMIF Function in Excel
STEPS:
- Select cell C10.
- Insert the formula:
=SUMIF(C5:C9,">0")
- Press Enter and you’ll see the expected result.
Read More: Excel Sum If a Cell Contains Criteria (5 Examples)
Method 2 – Use an Excel Table to Sum Positive Numbers Only
The Excel Table feature is really helpful while doing operations following certain conditions. In this method, we are going to use the Table feature in Excel to Sum Positive Numbers Only.
STEPS:
- Select the range of cells you want to work with.
- Select the Table feature under the Insert tab.
- A dialog box will pop out.
- Check My table has headers and press OK.
- You’ll get a Table.
- Select the arrow for Profit/Loss.
- Select Number Filters.
- Select Greater Than.
- A new dialog box will pop out.
- Type 0 in the first input box and press OK.
- You’ll see your Table with only the Positive Numbers.
- Click any cell inside the Table.
- Check the Total Row feature under the Table Design tab.
- You’ll get the Sum in the cell right under the Table.
Read More: Sum to End of a Column in Excel (8 Handy Methods)
Similar Readings
- How to Sum Only Visible Cells in Excel (4 Quick Ways)
- Shortcut for Sum in Excel (2 Quick Tricks)
- How to Sum Multiple Rows in Excel (4 Quick Ways)
- Sum If a Cell Contains Text in Excel (6 Suitable Formulas)
- How to Sum Columns in Excel (7 Methods)
Method 3 – Applying a Filter to Sum Positive Numbers in Excel
We’ll use the same dataset.
STEPS:
- Select the Filter feature under the Data tab.
- Select the drop-down arrow for Profit/Loss.
- Select Number Filters.
- Select Greater Than.
- A new dialog box will pop out.
- Type 0 in the first box and press OK.
- You’ll get only Positive Numbers.
- Select cell C11.
- Press Alt + =.
- Press Enter and the Sum will appear in cell C11.
Read More: How to Sum Filtered Cells in Excel (5 Suitable Ways)
Method 4 – Sum Only Positive Numbers with Excel VBA
STEPS:
- Select the Visual Basic feature in the Developer tab or press Alt + F11.
- A window will pop out.
- Select the Insert tab.
- Select the Module option.
- Another window will pop out.
- Copy the Code given below and paste it into the Module window.
Sub add_positive_numbers_only()
Dim sheet As Worksheet
Dim rg As Range
Dim result As Range
Set sheet = Application.ActiveSheet
Set rg = Application.Selection
Set result = Application.InputBox( _
Title:="Select the Cell for Showing Result", _
Prompt:="Select the Cell where you want to see the Sum", _
Type:=8)
result.Value = Application.WorksheetFunction.SumIf(rg, ">0")
End Sub
- Close the Visual Basic window.
- Select the range of data cells.
- Select the Macros feature under the Developer tab.
- Select the Macro name add_positive_numbers_only and press Run.
- An input box will appear.
- Select the cell where you want to see the Sum result. We selected cell C10.
- Press OK.
- You’ll see the Sum result in the cell you selected.
Read More: How to Add Numbers in Excel (2 Easy Ways)
Further Readings
- Sum Formula Shortcuts in Excel (3 Quick Ways)
- How to Use VLOOKUP with SUM Function in Excel (6 Methods)
- Sum Cells in Excel: Continuous, Random, With Criteria, etc.
- How to Sum Colored Cells in Excel (4 Ways)
- Add Multiple Cells in Excel (6 Methods)
- How to Add Specific Cells in Excel (5 Simple Ways)