IF function help on a simple formula

Copper Contributor

Hi there, i am looking for help on a very basic formula:

 

Cell C1 = If cell A1 and/or cell B1 is blank, then return blank, otherwise return the result of Cell B minus Cell A.

 

I have tried multiple options but don't get the preferred answer.

7 Replies

@Tian77 

It could be

=IF((LEN(A1)+LEN(B1))*LEN(B1),B1-A1,"")
Hi Sergei, i copied your formula, however am still getting a error: "not trying to type a formula" , excel thinks i am trying to type a statement.

@Tian77 

Please check the formula in attached file

@Tian77 

Try this: 

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

"",

B1-A1)

Great, thanks Twifoo, this works ! Much appreciated
Thanks Sergei, the formula posted by Twifoo fits my condition on the file. Thanks for the help !
Your appreciation is my delight!