SOLVED

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

Copper Contributor

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. 

 

MarkD72_0-1671098732609.png

 

 

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

5 Replies

@MarkD72 

On which column(s) should the color of Appetite Status be based?

Hi @Hans Vogelaar , 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

 

MarkD72_3-1671117074506.png

 

MarkD72_6-1671119202051.png

 

 

Regards

Mark

 

 

 

 

 

best response confirmed by MarkD72 (Copper Contributor)
Solution

@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:

mtarler_0-1671123173239.png

 

@mtarler Brilliant piece of work :)

 

Never heard of LAMDA before so will spend a bit of time understanding the function and formulas you have used.

 

Thanks for this

Mark

Highly recommend learning Lambda and Let but if needed you could just replace the
LcolVal(xxx) with the INDEX(xxx, XMATCH(TRUE, ISNUMBER(xxx), 0, -1)) from the LAMBDA in each case
1 best response

Accepted Solutions
best response confirmed by MarkD72 (Copper Contributor)
Solution

@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:

mtarler_0-1671123173239.png

 

View solution in original post