Forum Discussion

NotSoFastEddie's avatar
NotSoFastEddie
Brass Contributor
Apr 09, 2024

Within a table - Retrieve a value in a row when a provided number is between an lower/upper pair

I have a table of lower/upper range value pairs.  I need to determine if a number fits in the range.  If yes, retrieve the SKU value from the same row.  It must search all rows in the table.

 

I have the formula to determine if a value fits in the range, but only on a single row.  I am struggling with which function to use to scan the table entries (XLOOKUP, VLOOKUP, HLOOKUP).  

 

=IF(AND($B$4>=MIN($B8,$C8),$B$4<=MAX($B8,$C8)),$D8,"NO RANGE FOUND")

 

 

 

 

 

    • NotSoFastEddie's avatar
      NotSoFastEddie
      Brass Contributor
      Thank you very much Oliver. I went through every function last night with nothing obvious for me. I have seen this combination of INDEX and MATCH before, but being a novice, I did not see it. Thanks again. Very big help!

Resources