4 of 4 people found this helpful
When you use an IF statement, you must remember that the statements are calculated in the order in which they are appear. This means that you should start at the extremes, not in the middle. I have rearranged your formula as follows:
IF [$ change] > 40.01 OR [$ change] < -40.01 THEN "Red"
ELSEIF [$ change] > 20.01 OR [$ change] < -20.01 THEN "Yellow"
Also, shouldn't your range start at 40.01 instead of 40.02?
Let me know if this helps,
So, could you say in other words that if you have multiple elseif statements that once the first condition is true it returns that value? Let's pretend [sales]= 31
if [sales] > 10 then "good"
elseif [sales] > 20 then "great"
elseif [sales] >30 then "awesome"
This would return "good" because it was the first condition met?
Thanks for clarifying.