Forum Discussion
kathrynr
Jan 08, 2019Copper Contributor
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.
4 Replies
- Haytham AmairahSilver 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
- SergeiBaklanDiamond Contributor
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?
- kathrynrCopper Contributor
Yes, I only want a sum in Column C if both A1>0 and B1>0?
- SergeiBaklanDiamond Contributor
It could be
=IF((A1>0)*(B1>0),A1+B1,"")