I want to find a nice way to get a specific value based on a category and another characteristic. I'll try to to exemplify it below;
Problems:
1) I want to check what category a certain entity belongs to.
2) Based on the answer in 1) AND another factor, lets call it experience points, I want to be able to get the value of the intercept between the two.
Data:
Entity............................XP.............A.........................B......................XP............A.............B
Gandalf.........................80..........Gimli....................Frodo.................0-50..........2.5.........3.1
Frodo............................21........Gandalf.....Witch-king of Angmar.....51-100......3.3.........4.2
Gimli.............................39............................................................... 101-150.....4.6..........7.4
Witch-king of Angmar..140
I.e. what I really want to find out is that Gandalf would have a value of 3.3 and the Which-king of Angmar would have 7.4 without reading the damn tables. I would highly appreciate a smart and lean way of doing this. I've tried matching, indexing, Vlookuping and building simple macros without finding that solution that'll make your stomach tickle in a special way. Please help me!