conditional formatting

lauren18

New Member
Joined
Sep 14, 2015
Messages
12
Please help! I am so stuck!!

I need to format several columns and rows with the following rules but I can't get all cells in my selection to change colour. For some reason only Q5 is changing to red

Also, I need to automatically duplicate this formatting on other rows without having to manually input the formatting rules for each row.

The rules I need are as follows;

If L5>M5
cells K5:R5 need to be red

If L5<M5
cells K5:R5 need to be green

If L5=$0.00
Cells K5:R5 need to be yellow
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi Lauren

In all cases when you're in the conditional formatting window make sure the range K5:R5 has been selected.

Case 1
Formula: =$L$5>$M$5
Formatting: Red

Case 2
Not sure what you mean

Case 3
Formula: =$L$5=0
Formatting: Yellow

If your conditional formatting is not working as expected, there is always a logical reason why. I always make sure if I'm having difficulty with CF I delete all the CF that is currently there and start from scratch.

Have fun

cheers

pvr928
 
Upvote 0
HI,

this hasn't worked. I've tried several times, clearing all conditional formatting from the spreadsheet.

using =$L$5>$K$5 (Red) hasn't applied to any of the cells

Where I've applied =$L$5<$K$5 (Green) - this has applied to all rows that do not have a 0

How do I apply all three conditions at once? and have them function correctly?
 
Upvote 0
Hi lauren18

If you're confident no other CF is being applied, then remember CF is based both on logic and hierarchy.

The CF rules operate in order of their 'seniority' so the first rule will override the second.

Also, look at the rules themselves - more than one can be true at any one time, ie L5 can both be zero and higher than M5.

I suggest you carefully set out what you are trying to achieve and then accept the limitations of these two principles, or modify your ranges (and so the CF) to suit your needs.

Have fun

cheers

pvr928
 
Upvote 0
Hi pvr928,

as 0 only appears in column L and all figures in column M must have a value of 1 or more zero cannot be higher than another figure. There are no minus figures. 0 is the lowest value in this instance.

I could go about this another way. I'm a third column, column N, there is a total of the difference between columns L and M.

i.e. M5 - L5 = N5

if N5 is a negative figure it must be red, if it is a positive figure it must be green.

Could this work better?
 
Upvote 0
Also this needs to apply to several rows, so I don't think the formulas were correct.

If L5 < M5 then row 5 should be red. If L6 > M6 then row six should be green etc.

How do I automate this without having to create a rule for each row?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,926
Messages
6,122,306
Members
449,079
Latest member
juggernaut24

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