HI,
Check out the Loc Sorted( ) function. It can be used to perform lookups.
For example, the code below assigns letter grades to simulated test scores. That is, using a lookup matrix [0, 60, 70, 80, 90], sample scores of 85, 67, 99, 92 and 89 are assigned letter grades F, D, C, B and A depending if the score exceeds 0, 60, 70, 80 or 90, respectively. I've used it in ways analogous to your use case.
Cheers,
Brady
Words( "FDCBA", "" )[Loc Sorted( [0, 60, 70, 80, 90], [85, 67, 99, 92, 89] )];
![brady_brady_0-1620871449883.png brady_brady_0-1620871449883.png](https://community.jmp.com/t5/image/serverpage/image-id/32807iD7DB04C360820AED/image-size/medium?v=v2&px=400)