I have the following rule that is very simple and seems to work but is throwing an error.
Remove the end if before the else?
You have an ELSE-IF after an END-IF. The structure you want is IF...ELSE-IF...END-IF. An ELSE-IF (like an ELSE) needs to be contained inside an IF...END-IF block. The END-IF ends the entire IF block.
I’d also simplify and not do a else if and only do an else.
Good idea. As-is, there's a logical gap where nothing will happen if the value equals 475, so that would take care of that (unless that is the desired behavior for some reason or one of the other conditionals is changed to
Looks good to me!