How to look up the next smaller item or the next larger item

The XLOOKUP function searches a range or an array for a match and returns the corresponding item from a second range or array. The syntax of the XLOOKUP function is as follows: = XLOOKUP ( lookup_value ; lookup_array ; return_array ; if_not_found ; match_mode ; search_mode ) The lookup value can be either a text or a number, inputted directly into the function or as a cell reference.   When looking up numbers, other than match type 0, exact match,

How to use less than or greater than MATCH

We can use the INDEX function to designate a cell range (array) from which we want to retrieve data and, at the same time, use the MATCH function to specify the address of a cell in that cell range (array), i.e., row and column.   The MATCH function returns the relative position of the item in the range, either a row or a column. The relative position is returned in the form of an integer number, such as 1, 2,