Forum Discussion

kathrynr's avatar
kathrynr
Copper Contributor
Jan 08, 2019

Sum

I want to add an auto sum but I only want the sum column to enter amounts when a specific column has a dollar amount in it.

 

So, if column A is $524.00 and column B is $0.00, I don't want anything in column C until column B is over $0.00.

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    Hi,

     

    You can use IF function in addition to OR function to get that done.

    So, try this formula in cell C1:

    =IF(OR(A1<=0,B1<=0),"",SUM(A1:B1))

     

    You can translate the above formula as follows:

    If whether cell A1 or Cell B1 is less than or equal to 0, then show nothing, otherwise apply the SUM.

     

    Hope that helps

  • Please clarify, you want to sum column (which one) if only  A and B are greater than zero in the row, or you'd like A1+B1 in C1 if both A1>0 and B1>0?

Resources