# Thread: Traffic lights - Increasing/Decreasing Trends

1. ## Traffic lights - Increasing/Decreasing Trends

Hello,

I need to conditionally format a cell to:
-return red/yellow/green when the value is below/above or within range of targets but dependent on an increasing or decreasing trend.
If the trend is decreasing and the value is above the target is should return red.
If the trend is increasing and the value is above the target is should return green.
For all there is a Threshold.

For example:
Value Target Trend TrafficLight
(A) 79% 90% Increasing RED
(B) 69% 70%-90% Withing Range Yellow
(C) 85% 90% Decreasing Green

Thresholds:
for example (A) - Red: <80%, Yellow: 80%-90%, Green: >90%
for example (B) - Red: 60-90%, Yellow: 50-60%;90-95%, Green: <50%;>90%
for example (C) - Red: >80%, Yellow: 80-90%, Green: <90%

Thank you very much!!!

2. That is a bit to general, no thresholds, I need a complex IF formula please

3. Nonsense, there are thresholds there, what do you think the =AND(criteria1,criteria2) does. You don't need IF, all you need is a formula that returns TRUE or FALSE which is what my formula does. You need to adapt it to youre situation, but that should be simple.