=SUMIF(B2:B11,">0",C2:C11) adds up column C for every row where column B is above zero. The operator and the zero sit together inside one pair of double quotes. When the range you’re testing is also the range you’re summing, drop the third argument: =SUMIF(B2:B11,">0") sums the positive values in that column and ignores the negatives.
To take the threshold from a cell so you can change it without editing the formula, join with &: =SUMIF(B2:B11,">"&D1,C2:C11). SUMIFS does the same job with the sum range first: =SUMIFS(C2:C11,B2:B11,">0"), and that’s the one to use when you need a second condition.
Two things worth knowing. ">0" excludes zero itself — use ">=0" if zeros should count.
And SUMIF only considers numbers, so a value stored as text is skipped silently, which is the usual reason a total comes out lower than expected.
Let’s say you manage a store’s inventory with a workbook where each row represents a different product. You have columns for product names, quantities, and weeks passed since each product was sold. To monitor your stock, you should sum up the quantities of products in inventory for over zero weeks.
To sum values that are greater than zero, you can use the SUMIF to specify a condition. In SUMIF, the criteria argument allows you to write a condition where you can use the greater than operator and enter a zero (0). You can use the same range for testing conditions and calculating the sum.

For example, the following formula adds up only the positive numbers in C2:C11. As there’s no sum_range, SUMIF tests and adds the same cells:
=SUMIF(C2:C11,">0")
Or you can also use two different ranges, one for testing the condition and one to get the sum.
Steps to Write Formula: SUMIF Greater than Zero
You can use the below steps:
- First, in a cell, enter the SUMIF function.
- After that, in the range argument, refer to the Days Passed column.
- Next, in the criteria argument, use “>0”.
- Now, in the sum_range argument, refer to the Quantity column.
- In the end, hit Enter to get the result.

=SUMIF(B2:B11,">0",C2:C11)
As you can see, it only returns the sum for the values from the Quantity column, where you have a value above zero in the days passed column. You can see the same result on the status bar.

Using a Cell Reference to Specify Zero
While writing the formula, you can refer to a cell to specify the zero in it.

=SUMIF(B2:B11,">"&D1,C2:C11)
In the above formula, in the criteria, we have used an ampersand and then referred to cell D1 where we have the zero. This gives a dynamic formula where you can change the condition in the cell instead of editing the formula.
What If I Want to use SUMIFS Instead of SUMIF?
Yes, you can use it. SUMIFS gives the same result here, and it lets you add more conditions later.

In SUMIFS, you need to specify the sum_range first. After that, you need to specify the criteria range, and in the end, you need to enter the criteria to test.
=SUMIFS(C2:C11,B2:B11,">0")
For example, to sum the quantity where the days passed are more than zero and the product isn’t “P5”, add a second pair of range and criteria:
=SUMIFS(C2:C11,B2:B11,">0",A2:A11,"<>P5")
Sum Values Less than Zero or Greater than or Equal to Zero
Just change the operator in the criteria. Use “<0” to add up only the negative numbers, and “>=0” to include the zeros as well (zeros don’t change the total, but it matters when you use the same criteria with COUNTIF or AVERAGEIF):
=SUMIF(C2:C11,"<0")
=SUMIF(C2:C11,">=0")
Numbers Stored as Text
SUMIF skips the cells where the number is stored as text, both in the condition range and in the sum range. So if your total looks too small, check for numbers aligned to the left or with a green triangle, and convert them to numbers.
SUMPRODUCT is another way to do this, but be careful: in a comparison, Excel treats any text as greater than any number, so a text value in B2:B11 counts as “greater than zero”. Use — to turn the values into numbers first:
=SUMPRODUCT((--B2:B11>0)*C2:C11)
Note that — returns #VALUE! for text that isn’t a number, like a word or a dash, so this version only works when the column has numbers (or numbers stored as text).
Frequently Asked Questions
Why does my SUMIF greater than zero formula return 0?
Either no cell meets the condition, or the numbers are stored as text, which SUMIF skips. Also check that the criteria is in double quotes, like “>0”, and that the two ranges are the same size.
Can I use SUMIF greater than zero with dates?
Yes, but for dates you normally compare with a date, like “>”&DATE(2025,1,1). Dates are numbers in Excel, so “>0” is true for every date.
How do I sum values greater than zero in visible rows only?
SUMIF also adds hidden and filtered rows. If you filter the data first with the filter for values greater than zero, use SUBTOTAL(109,C2:C11) to add only the visible rows.
Written by
Puneet Gogia
Microsoft MVP — Excel · Founder, Excel Champs
Twelve years of teaching Excel, and a decade before that using it as a data analyst. Every tutorial here is written from a file I actually built.