IF THEN ELSE IF Calculation

I have a table in the form of (and some examples)

Row#;Value1;Value2
1;1;0
2;5;3
3;Blank;Blank (so, should be a number but it’s empty)

Now let’s say i create a new column to calculate Value1/(Value1+Value2) for each line and if it’s over a value have text1, under the value text2 but if it’s empty in both columns it will return a “division by 0” error and i want have text3 instead of that.

Methods that do work:

  • use the Rule Action
  • Replace text action on the text error

What i am trying that does not work (and i don’t understand why):
IF THEN ELSE, etc, but at the Last ELSE IF THEN I tried with
IF
iserror(Value1/(Value1+Value2))
THEN
“text3”

or even with

IF
isempty([Value1]) AND
isempty([Value2])
THEN
“text3”

Does anybody have any clue why?

When writing expressions with type- or error-checking conditions, place the conditions first and only calculate values when the conditions are satisfied.

The project below has the following expression:

LET V = [Value1] / ([Value1] + [Value2])
IF iserror(V) THEN "text3" ELSE
IF V >= 1 then "text2" ELSE "text1"

if-then.morph (3.6 KB)