Sum Only Positive Numbers in Excel: SUMIF & SUMIFS Examples

If you’re working with a large dataset in Excel, you might need to sum only the positive numbers. This can be a tricky task, especially if you have a lot of data to work with. Fortunately, Excel has a built-in function that makes it easy to sum only positive numbers.

The SUMIF function in Excel allows you to sum only the cells that meet certain criteria. In this case, you can use the function to sum only the positive numbers in your dataset. This function is especially useful if you have a large dataset with both positive and negative numbers and you want to quickly calculate the sum of the positive numbers.

SUMIF Function

Excel provides a useful function called SUMIF that allows you to sum only positive numbers in a range of cells. This function is especially helpful when you have a large data set and want to quickly find the sum of positive values.

The syntax of the SUMIF function is as follows:

Function Description
=SUMIF(range, criteria, [sum_range]) Calculates the sum of a range of cells that meet a specified criteria.

The range argument specifies the cells that you want to evaluate, while the criteria argument specifies the condition that the cells must meet in order to be included in the sum. The optional sum_range argument specifies the cells you want to sum if they meet the condition if the sum_range is not the same as the range .

To sum only positive numbers using the SUMIF function, you can use the following formula:

=SUMIF(range, ">0")

This formula will sum all values in the specified range that are greater than zero. You can adjust the criteria to sum only values that meet other conditions, such as greater than or equal to a certain number.

For example, if the values I want to sum are located in range A1:A10 then I would enter the following formula:

=SUMIF(A1:A10, ">0")

Using the SUMIF function can save you time and effort when working with large data sets in Excel. By specifying the criteria for summing only positive numbers, you can quickly get the information you need without manually sorting through the data.

SUMIFS Function

If you have a range of numbers in Excel and want to sum only the positive numbers, you can use the SUMIFS function. This function allows you to specify multiple criteria that must be met in order for the sum to be calculated.

The schema of the function is as follows:

=SUMIFS(range_to_sum,criteria_range2,condition1,criteria_range2,condition2,...)

Where range_to_sum is the range you want to add when all the criteria_ranges and their corresponding conditions are met.

Here’s how to do it:

Select an empty cell where you want the sum to appear. Type the following formula:

Formula Description
=SUMIFS(A1:A10,A1:A10,">0") This formula will sum all the positive numbers in the specified range.

The range_to_sum is A1:A10 with the range of cells containing the numbers you want to sum, and the first criteria_range with the same range. The ">0" is the condition on the criteria_range and tells Excel only to sum cells that contain a value greater than zero.

The result should be the total of all positive numbers in the A1:A10 range.

Using the SUMIFS function can save you time and effort when you need to sum only certain values in a large range of data. This function is also useful for summing negative numbers or other criteria, as you can specify any condition that must be met in order for the sum to be calculated.

Use Array Formula

If you have a large dataset and want to sum only positive numbers, you can use an array formula in Excel. Array formulas are powerful formulas that can perform complex calculations on a range of cells.

Here’s how to use an array formula to sum positive numbers:

  1. Select the cell where you want the sum to appear.
  2. Type the following formula: =SUM(IF(A1:A10>0,A1:A10))
  3. Press Ctrl + Shift + Enter to enter the formula as an array formula.

The formula checks if each cell in the range A1:A10 is greater than 0. If the cell is greater than 0, it includes the value in the sum. If the cell is less than or equal to 0, it excludes the value from the sum.

Here’s an example:

Data Formula Result
5 =SUM(IF(A1:A10>0,A1:A10)) 5
-2 =SUM(IF(A1:A10>0,A1:A10)) 5
8 =SUM(IF(A1:A10>0,A1:A10)) 13
-4 =SUM(IF(A1:A10>0,A1:A10)) 13

As you can see, the formula only sums the positive numbers in the range A1:A10, which are 5 and 8.

Conclusion

In conclusion, summing only positive numbers in Excel is a simple task that can be achieved in a few steps. By using the SUMIF function, you can easily sum all positive numbers in a range of cells while ignoring the negative ones.

It is important to keep in mind that this function only works with numerical values and not with text or other non-numeric data. Additionally, it is important to ensure that the range of cells you are summing is correctly specified to avoid any errors in your calculation.

By following the steps outlined in this article, you can quickly and accurately sum only positive numbers in Excel, saving you time and reducing the risk of errors in your calculations.

Photo of author
Ryan Sheehy
Ryan has been dabbling in code since the late '90s when he cut his teeth exploring VBA in Excel. Having his eyes opened with the potential of automating repetitive tasks, he expanded to Python and then moved over to scripting languages such as HTML, CSS, Javascript and PHP.