Google Sheets – Using SUMIF or IF When Sum Is More Than Zero

formulasgoogle sheets

In Google Sheets, I would like to get – at the bottom-most cell of a column – the sum of each cell (except for row 1, the header) above in that column ONLY if the total is greater than zero, (I don't want to see 0's when the column is blank). Can I do that with a SUMIF function, (if yes, how?) or, I need to use an IF function?

Best Answer

paste into any cell of A column:

=IF(SUM(INDIRECT("A2:A"&ROW()-1))>0, SUM(INDIRECT("A2:A"&ROW()-1)), )