How do I add the IFERROR into this please: =IF(B14-C14>0,B14-C14,"")
CodePudding user response:
Take entire EXPR (without primary equals sign '=') and simply re-write as follows:
= IFERROR(EXPR,"Fun=Smile.Learn=Fun.( ▀ ͜͞ʖ▀)=Ε/̵͇̿̿/’̿’̿ ̿̿ ̿̿ ̿̿ ")
Now. In your case we have:
EXPR = IF(B14-C14>0,B14-C14,""), substituting into above yields:
= IFERROR(IF(B14-C14>0,B14-C14),"Fun=Smile.Learn=Fun.(▀ ͜͞ʖ▀)=Ε/̵͇̿̿/’̿’̿ ̿ ̿̿ ̿̿ ̿̿ ")
CodePudding user response:
There is a function, called IsError(), which you can use in an IF() function, as follows:
=If(IsError(try_expression(...)), value_if_error, value_is_no_error)
So your formula would become something like:
=If(IsError(B14-C14), "Error", If(B14-C14>0, B14-C14, "empty"))
This gives following results:
Errorin case the subtraction betweenB14andC14fails.emptyin case the subtraction betweenB14andC14works but yields a negative number.B14-C14in all other cases.
Good luck
