Conditional Formatting

Fester675

Board Regular
Joined
Sep 16, 2016
Messages
141
I have 5 columns, headed Q1, Q2, Q3, Q4 and RAG. I need the RAG column to change colour (Red, Amber, Green) based on entries.

Q1 will be populated and no action is required in the RAG column.

When a figure is entered in Q2, if Q2 = Q1 then RAG will be Amber. If Q2 > Q1 then RAG will be Red. If Q2 is < Q1 then RAG will be Green.

When a figure is entered in Q3, if Q3 = Q2 then RAG will be Amber. If Q3 > Q2 then RAG will be Red. If Q3 is < Q2 then RAG will be Green.

When a figure is entered in Q4, if Q4 = Q3 then RAG will be Amber. If Q4 > Q3 then RAG will be Red. If Q4 is < Q3 then RAG will be Green.

Thanks in advance!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Assuming that the numbers are entered in A though D with Q1 in A and Q4 in D. Adjust to match your range
Select the cells you want to conditional format

in conditional formatting use and select your amber formatting. This is three different rules
Code:
=AND(A2=B2,A2<>"",C2="",D2="")

=AND(B2=C2,C2<>"",D2="")

=AND(D2=C2,D2<>"")

then for red create three rules
Code:
=AND(B2>A2,C2="",D2="")

=AND(C2>B2,D2="")

=AND(D2>C2,D2<>"")
 
Upvote 0

Forum statistics

Threads
1,214,972
Messages
6,122,530
Members
449,088
Latest member
RandomExceller01

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