I have a table of chapters from the book A Game of Thrones, and the page that this chapter starts. I want to take a given page number, find the nearest numerical value going down, and then pick out the chapter name for that row. For example:
Eddard II - 104
Tyrion II - 113
Catelyn III - 122
Given the input 119
, I want to find the next lowest number on the right-hand column, which is 113
, and then output the chapter name on the left-hand column, so Tyrion II
. I can't work out how to do this formulaically: it looks like it should be a job for VLOOKUP, but I don't know if VLOOKUP can accommodate ranges, less than or greater than when looking for a row. How should I go about this?
Excel-based solutions are also fine, so long as they're applicable to Libreoffice Calc.