Search code examples
excelindexingexcel-formulamatchformula

Formula Help to Find if Number between a Range in 2 Columns and then Offset 1 column


I have 2 groups of columns that are. The first group is a set of 2 columns: 1st column and 2nd columns are both numeric and have a set of search values. The 3rd and 4th columns represent ranges, with the 3rd representing the low/floor value of range, and the 4th column representing the high/ceiling value of range. The 5th column is a unique number attached to that range/row.

The Excel formula checks to see if the 1st column has a value, if not, then the 2nd column, and then searches for that number in the range and returns the unique value from the 5th column. enter image description here


Solution

  • You can try INDEX/MATCHas array formula:

    =INDEX(A:A,MATCH(1,(F2>=B:B)*(F2<=C:C),0))
    

    enter image description here

    edit:

    then try array formula

    =INDEX(F:F,MATCH(1,(IF(A2="",B2,A2)>=D:D)*(IF(A2="",B2,A2)<=E:E),0))
    

    enter image description here