Given a spreadsheet that contains a number of rows with a category and a number, such as:
category 1 20,000
I want to run that against the below table:
100 200 300 400 500 600
category 1 6,250 15,000 30,000 60,000 90,000 175,000
category 2 5,500 15,000 34,000 70,000 120,000 250,000
category 3 1600 1,500 3,000 6,500 8,000 11,000
category 4 12,000 35,000 65,000 100,000 150,000 215,000
Now in this case I want to compare that number to the range of values in the table for category 1. So in this case it matched category 1, now it needs to cycle through those values and if less than the number higher than it, return the header number at the top of the table for than range it falls in. So in this case the number is less than 30,000 for that category, and so it would return the header of 200 in the table. Hopefully you see how that works. I am able to grind out a series of IF statements that logically works, but with my table size it far exceeds the 64 nested ifs limit. I've played around with MATCH and INDEX but can't figure out how to get it to properly act on the entire table.
Bookmarks