I have not bothered with cutoffs since for example you have not specified the formatting you required for a cell in ColumnQ with value -5
.
For consistency with the details in your link, I have assumed that the likes of values >-5
refer to -5%
rather than -5
.
To change the color of the cells in column P so they are equal to their "matching" cells in column Q, without ruining the formulas created in column P apply Conditional Formatting (which does not alter the actual cell content, only its appearance).
To format ColumnP cells according to rules determined by ColumnQ cells adjust the range to which the formatting is applied. Roughly, determine the format for Q and apply that to P:Q.
Since three colours are involved CF will require at least two rules where determined by formulae (a third colour could be applied by 'standard' fill, which CF rules override).
Formula rules as below appear to meet my limited understanding of your requirements:
Green: =$Q4>-0.05
Yellow: =AND($Q4>-0.25,$Q4<0.05)
Red: =$Q4<0.25
For the example I chose the applicable range for each as:
=$P$4:$Q$12
Note:
- These do not directly address transition values such as -5%
- Empty cells will also be formatted
- The order of the rules makes a difference