where values in B5:B9 are sorted in descending order.

Context

Suppose you have a product that is sold in rolls of 100 feet, and orders are allowed in whole rolls only. For example, if you need 200 feet of material, you need two rolls total, and if you need 275 feet, you’ll need to buy three rolls. In this case, you want the formula to return the “next highest” tier whenever you cross over an even multiple of 100. Using the lookup value in cell F4, MATCH finds the first value in B5:B9 that is greater than or equal to the lookup value. If an exact match is found, MATCH returns the relative row number for that match. When no exact match is found, MATCH continues through the values in B5:B9 until a smaller value is found, then it “steps back” and returns the previous row number. In the example shown, the lookup value is 275, so MATCH returns a row number of 3 to INDEX: The INDEX function then returns the third value in the range C5:C9, which is $383.

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.