Forum Discussion

ffrank25's avatar
ffrank25
Copper Contributor
Oct 12, 2021
Solved

Excel Formula

Hello!   I'm hoping someone could help me to create a formula based on the following information:   List of ranges: Apples = 1-49 Oranges = 50-59 Grapes = 60-69 Melons = 70-79 Bananas = 80-8...
  • OliverScheurich's avatar
    Oct 12, 2021

    ffrank25 

    I suggest following rule for conditional formatting:

    =AND(VLOOKUP(A2,$G$3:$I$9,3,TRUE)>=B2,VLOOKUP(A2,$G$3:$H$9,2,TRUE)<=B2)

    To apply this formula you have to sort the table containing your ranges in ascending order. Please compare attached file.

     

    If you want to highlight non matching values in addition i would enter additional rule for formatting:

    =NOT(AND(VLOOKUP(A2,$G$3:$I$9,3,TRUE)>=B2,VLOOKUP(A2,$G$3:$H$9,2,TRUE)<=B2))

     

Resources