How to Sum Only Positive Numbers in Excel (4 Simple Ways)

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.

excel sum only positive numbers


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")

Sum Only Positive Numbers by applying SUMIF Function in Excel

  • Press Enter and you’ll see the expected result.

Sum Only Positive Numbers by applying SUMIF Function in Excel

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.

Use of Excel Table feature to Sum Positive Numbers Only

STEPS:

Use of Excel Table feature to Sum Positive Numbers Only

  • Select the Table feature under the Insert tab.

Use of Excel Table feature to Sum Positive Numbers Only

  • A dialog box will pop out.
  • Check My table has headers and press OK.

Use of Excel Table feature to Sum Positive Numbers Only

  • You’ll get a Table.

Use of Excel Table feature to Sum Positive Numbers Only

  • Select the arrow for Profit/Loss.

Use of Excel Table feature to Sum Positive Numbers Only

  • Select Number Filters.
  • Select Greater Than.

Use of Excel Table feature to Sum Positive Numbers Only

  • 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


Method 3 – Applying a Filter to Sum Positive Numbers in Excel

We’ll use the same dataset.

Application of Filter to Sum Positive Numbers in Excel

STEPS:

  • Select the Filter feature under the Data tab.

Application of Filter to Sum Positive Numbers in Excel

  • Select the drop-down arrow for Profit/Loss.

Application of Filter to Sum Positive Numbers in Excel

  • Select Number Filters.
  • Select Greater Than.

Application of Filter to Sum Positive Numbers in Excel

  • A new dialog box will pop out.
  • Type 0 in the first box and press OK.

Application of Filter to Sum Positive Numbers in Excel

  • You’ll get only Positive Numbers.

  • Select cell C11.
  • Press Alt + =.

  • Press Enter and the Sum will appear in cell C11.

Application of Filter to Sum Positive Numbers in Excel

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.

Excel Sum Only Positive Numbers by VBA Method

  • A window will pop out.
  • Select the Insert tab.
  • Select the Module option.

Excel Sum Only Positive Numbers by VBA Method

  • 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

Excel Sum Only Positive Numbers by VBA Method

  • Close the Visual Basic window.
  • Select the range of data cells.

Excel Sum Only Positive Numbers by VBA Method

  • Select the Macros feature under the Developer tab.

Excel Sum Only Positive Numbers by VBA Method

  • 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

Get FREE Advanced Excel Exercises with Solutions!
Aung Shine
Aung Shine

Aung Shine completed his bachelor’s in Electrical and Electronics Engineering from Bangladesh University of Engineering and Technology. It has been almost 2 years since he joined SOFTEKO and actively working on the ExcelDemy project. Currently he works as a Team Leader where he guides his team members to create technical content. He has published 150+ articles and reviewed 50+ articles. He has also solved various user problems before. He has interests in Data Analysis, Power Query, Advanced Excel,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo