I am looking for a Formula to calculate cells having numbers only and ignore blank cells. The condition is between two cells, IF there is a value in A column then ADDITION should take place or IF there is value in B column then SUBTRACTION should take place

Case 1:

A2(number),B2(Empty),C2=(C1+A2) {Ignoring B2 as blank cell} 

Case 2:

A2(Empty),B2(number),C2=(C1-B2) {Ignoring A2 as blank cell}

Kindly suggest appropriate formula to the above condition. Thanks!!

1 Answer 1


Please try the following formula in cell C2:


Functions used:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.