You can use a formula based approach to the conditional formatting rules to get your desired output.
Steps
Select Cells
- Click the first cell where you want the conditional formatting to start (A2)
- Drag the selection to all cells where you want the rules to apply (A2:A1000)
Open Conditional Formatting
- Click
Conditional Formatting
from the Home
ribbon (top menu)
- Choose
New Rule
- Choose
Use a formula to determine which cells to format
Enter Formulas
You'll need 3 formulas, one for each color
- For Green (Greater than the cell above):
- Enter the formula:
=A2>A1
(assuming you're starting from A2)
- Click on the Format button, go to the Fill tab, and choose a green color.
- Click OK.
- For Red (Less than the cell above):
- Again, choose New Rule > Use a formula to determine which cells to format.
- Enter the formula:
=A2<A1
- Click on the Format button, go to the Fill tab, and choose a red color.
- Click OK.
- For Yellow (Equal to the cell above):
- Once more, choose New Rule > Use a formula to determine which cells to format.
- Enter the formula:
=A2=A1
- Click on the Format button, go to the Fill tab, and choose a yellow color.
- Click OK.
You can click OK to close any remaining dialog boxes. Your settings should be applied. To edit any of these formulas or other settings, highlight the cells with the conditional formatting applied, and select Manage Rules
from the Conditional Formatting ribbon.