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] )];