So, I've got a chart (an EXP chart for an RPG) with several break points in it. One column is how many EXP is required to get to a level, the other column is what level you get to be given that EXP total. Like this:
EXP | Level --------------- 0 | 1 2,000 | 2 4,000 | 3 9,000 | 4
and it goes up to level 36, but you get the idea. The EXP required does not follow a formula (sadly).
Now, I want the player to type into one box how many EXP they have, and then I want another box to reference the chart and compute their current level. I know that I could do it using a long chain of if statements, but it seems like there should be a better way of doing it.
What is that better way?