2

I have Cells A, B and C. Cell C = B - A. The problem is if cell B does not have a value, Cell C has a value of (A). I would like cell C to not have a value if cell B does not have a value.

5

Another alternative to this would be to use ISBLANK() inside the IF statement in cell C?.

IF(ISBLANK(B1), "", B1-A1)

This checks to see if B1 is blank. If true, it returns nothing. Otherwise it will run the calculation.

4

You can do this by using an if statement

Here is the formula for if B is empty, A may or may not be empty.

=IF(B1="","",B1-A1)

Here is the formula for if A or B is empty.

=IF(OR(B1="",A1=""),"",B1-A1)

The formula would replace the contents of cell C

0

I would prefer counting the number of non-empty cells.

=IF(COUNTA(A1:B1)=2,B1-A1,"")

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.