findle(var,a1,a2,[b1,b2,[c1,c2,…]]z)

This transform is a shortcut for a multiply nested $if statement. It takes as input one variable, then any number of pairs of arguments, followed by one final argument. For example,
$findle(!var!,a1,a2,b1,b2,c1,c2,z)
is equivalent to
$if(!var!<=a1, a2, $if(!var!<=b1, b2, $if(!var!<=c1, c2, z)))
Both cases are interpreted as “if var is less than or equal to a1, then output a2, otherwise if var is less than or equal to b1, then output b2, otherwise if var is less than or equal to c1, then output c2, otherwise output z”; that is, “
find
the first listed value to which the input is
less
-or-
equal
”.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.