I’m not sure if the title makes sense, but I hope it does.
Here is what I am trying to accomplish:
I have a table that looks like the following:
Minimum | Maximum | Category |
---|---|---|
1 | 11 | 11U |
1 | 13 | 13U |
14 | 15 | 14-15 |
16 | 17 | 16-17 |
18 | 20 | JR |
15 | 34 | SR |
35 | 39 | 35 |
40 | 44 | 40 |
45 | 49 | 45 |
Given an age, for example, 8, I would like the result to be the category 11U. If the given age is 16, then the returned category should be 16-17, not SR. So, always return the first result that matches the given criteria.
Again, I hope that I have explained this well enough. I am more than happy to add more information as needed.
Thanks