Hi ,
I believe your function did not work properly because the “if” function needs the whole expression in case you work with the “OR” operator.
→ The “OR” logic operator performs disjunction on two expressions, not results/values.
Your simplified formula could then look as per the below picture.