Conditional formatting on 3 overlapping values

wsurfa

New Member
Joined
Mar 21, 2008
Messages
18
Is it possible to use standard conditional formatting over 3 overlapping values?

I have a range of cells a5:a57. I want try and do the following

If is greater than A1 then format red text
If is greater than preceeding cell (ie A5>A6, A6>A7 etc) then format orange fill
If greater than A1 and greater than preceeding cell then format red text and orange fill.

The values as examples could be

A1=100

A5 = 104
A6 = 105

or A= 99

A5 = 97
A6 = 98

I can use =IF(AND) for the 3rd criteria, and cell value for the first two.

However when used it only applies the first criteria. I assume this is because the ranges being tested overlap.

Can anyone help?
 

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.
Hi

Select cell A5 and follow these steps:

1) Go to Conditional Formatting.

2) In Condition 1, select "Formula Is" and then type this formula exactly as shown below:

=AND($A5>$A$1,$A5>$A6)
Format Text as Red and Fill as Orange Only.

3) In Condition 2, select "Cell Value Is" | select "greater than" and type this:

=$A6
Format Fill as Orange Only.

4) In Condition 3, select "Cell Value Is" | select "greater than" and type this:

=$A$1
Format Text as Red Only.

Finally, select A5 again, press Ctrl+C --> again select range A6:A57 --> Edit --> Paste Special --> Formats --> Click on OK.
 
Upvote 0
Thanks Stormseed - works perfectly.

I didn't realise the importance of the order, but it's logical.
 
Upvote 0

Forum statistics

Threads
1,215,221
Messages
6,123,699
Members
449,117
Latest member
Aaagu

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