excelvbaformulas

Excel Find if value is within interval and return interval category


I have a lot of numbers in column A. In column B I want to be able to retrieve the right category found in column D based on the interval specified in column E-F. VBA or formula would help a lot!

You can see the end result with a few ranges and values in the attatched picture.

End result


Solution

  • As stated a simple INDEX/MATCH will do it:

    =INDEX(D:D,MATCH(A2,E:E))