Home > other >  How to implicate IFERROR into this function in Excel?
How to implicate IFERROR into this function in Excel?

Time:08-22

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:

  • Error in case the subtraction between B14 and C14 fails.
  • empty in case the subtraction between B14 and C14 works but yields a negative number.
  • B14 - C14 in all other cases.

Good luck

  • Related