Stuck on a conditional format formula

Mr_Phil

Board Regular
Joined
May 28, 2018
Messages
141
Office Version
  1. 365
Thanks for looking. I'm frustrated that so far I am not getting it. I would like to conditionally format a cell to turn green/red if it is +/- more than x % .

MAIN!S2 = 100 it is the benchmark (google drive std hours between two addresses)
MAIN!R2 = 110 is the actual drive time
TABULATED ROUTE DATA!k15= 10% which is the adjustable variance up or down from the benchmark that is allowed. If k15= 10% and R2 = 91 thru 109 would be green. Anything outside of that is red. My boss wants two variables. So that there is a warning buffer (exceeding 10% in either way) at yellow and the driver is coached and warned. And if it is over 11% either way it is red and the driver is disciplined if called for. I told her I'd be happy to get reliable formatting with just one variable.

The picture is the rule I made before they decided they should be able to change the variable on a whim (to account for weather or other uncontrollables) so I am back at square one.
Any advice on method, technique, or just an expression of sympathy would be awesome LOL. Happy Holidays and Peace.

1703283118907.png
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Use a formula to determine which cells to format:

Formatted as Green Applies to $R:$R:
Excel Formula:
=AND($R1>=($S1*(1-'TABULATED ROUTE DATA'!$K$15)),$R1<=($S1*(1+'TABULATED ROUTE DATA'!$K$15)))
Formatted as Red Applies to $R:$R:
Excel Formula:
=OR($R1>($S1*(1+'TABULATED ROUTE DATA'!$K$15)),$R1<($S1*(1-'TABULATED ROUTE DATA'!$K$15)))
 
Upvote 0
And for what your Boss wants:

Use a formula to determine which cells to format:

Variable as cutoff between Green & Yellow: 'TABULATED ROUTE DATA'!$K$15
Variable as cutoff between Yellow & Red: 'TABULATED ROUTE DATA'!$K$16

Formatted as Green Applies to $R:$R:
Excel Formula:
=AND($R1>=($S1*(1-'TABULATED ROUTE DATA'!$K$15)),$R1<=($S1*(1+'TABULATED ROUTE DATA'!$K$15)))
Formatted as Yellow; Applies to $R:$R:
Excel Formula:
=AND($R1>=($S1*(1-'TABULATED ROUTE DATA'!$K$16)),$R1<($S1*(1-'TABULATED ROUTE DATA'!$K$15)))
Formatted as Yellow; Applies to $R:$R:
Excel Formula:
=AND($R1>($S1*(1+'TABULATED ROUTE DATA'!$K$15)),$R1<=($S1*(1+'TABULATED ROUTE DATA'!$K$16)))
Formatted as Red Applies to $R:$R:
Excel Formula:
=OR($R1>($S1*(1+'TABULATED ROUTE DATA'!$K$16)),$R1<($S1*(1-'TABULATED ROUTE DATA'!$K$16)))

1703287732834.png
 
Upvote 1
Solution
And for what your Boss wants:

Use a formula to determine which cells to format:

Variable as cutoff between Green & Yellow: 'TABULATED ROUTE DATA'!$K$15
Variable as cutoff between Yellow & Red: 'TABULATED ROUTE DATA'!$K$16

Formatted as Green Applies to $R:$R:
Excel Formula:
=AND($R1>=($S1*(1-'TABULATED ROUTE DATA'!$K$15)),$R1<=($S1*(1+'TABULATED ROUTE DATA'!$K$15)))
Formatted as Yellow; Applies to $R:$R:
Excel Formula:
=AND($R1>=($S1*(1-'TABULATED ROUTE DATA'!$K$16)),$R1<($S1*(1-'TABULATED ROUTE DATA'!$K$15)))
Formatted as Yellow; Applies to $R:$R:
Excel Formula:
=AND($R1>($S1*(1+'TABULATED ROUTE DATA'!$K$15)),$R1<=($S1*(1+'TABULATED ROUTE DATA'!$K$16)))
Formatted as Red Applies to $R:$R:
Excel Formula:
=OR($R1>($S1*(1+'TABULATED ROUTE DATA'!$K$16)),$R1<($S1*(1-'TABULATED ROUTE DATA'!$K$16)))

View attachment 103966

Ok, wow. You are my new best friend. If you are ever in Lubbock Texas you can feel free to message me and lunch is on me for sure. Thank you so much.
 
Upvote 0

Forum statistics

Threads
1,215,072
Messages
6,122,968
Members
449,095
Latest member
Mr Hughes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top