Forum Discussion

MarkD72's avatar
MarkD72
Copper Contributor
Dec 15, 2022
Solved

Conditional Formatting based on a % of a min / max value

Hello
I've created a table where I would like to track a monthly actual value against a set min and max tolerance threshold - example below. 

 

 

 

Key Risk Indicator (over 12 month period)Jun 22 ValueJul 22 ValueAug 22 ValueSep 22 ValueOct 22 ValueNov 22 ValueDec 22 ValueMin TolMax TolAppetite Status
KRI 10.000.010.000.000.010.070.30-0.050.05Inside
KRI 2159000.001512.000.000.003496106.001334678.0045998.00500000.002000000.00Outside
KRI 31.200.970.960.940.960.961.200.921.00Inside
KRI 50.130.060.080.040.050.171.00-0.050.05Outside
KRI 70.020.030.050.100.030.020.040.020.05Inside
KRI 90.000.002.000.002.002.007.000.005.00Inside
KRI 103.005.007.003.003.001.008.003.007.00Inside

 

My thinking is this:


If actual cell value x is within 10% of min tol cell value, then, actual cell value fill = Amber and Appetite Status cell = Amber
If actual cell value x within 20% of max tol value, then, actual cell value fill = Amber and Appetite Status cell = Amber
If actual value x is <= to min tol value, then actual cell value fill = Red and Appetite Status cell = Red
If actual value x is => to max value, then actual cell value fill = Red and Appetite Status cell = Red
Else actual cell value = Green and Appetite Status cell = Green
 
I have played around with Excel Conditional Formatting options without any success and was hoping somebody may be able to help with a suggested formula to achieve what I'm trying to do?
 
Thanks in advance

  • MarkD72 I created 1 Lambda function and 6 conditional formatting rules

    the lambda was:

    LcolVal = LAMBDA(in, INDEX(in, XMATCH(TRUE, ISNUMBER(in), 0, -1)))

    the rules are:

     

5 Replies

    • MarkD72's avatar
      MarkD72
      Copper Contributor

      Hi HansVogelaar , thanks for replying. The Appetite status will be based on the last or most recent actual available. I've tried to visualise what I'm aiming for below

       

       

       

       

      Regards

      Mark

       

       

       

       

       

      • mtarler's avatar
        mtarler
        Silver Contributor

        MarkD72 I created 1 Lambda function and 6 conditional formatting rules

        the lambda was:

        LcolVal = LAMBDA(in, INDEX(in, XMATCH(TRUE, ISNUMBER(in), 0, -1)))

        the rules are:

         

Resources