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!!


Please try the following formula in cell C2:


Functions used:

  • Have you tried the solution? Did it work for you? If not we should try finding out why. If yes, as per site guidelines when an answer addresses your question, you should accept it and maybe upvote it so others can benefit as well. May 20 '20 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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