Conditional Formatting

Badnames

Board Regular
Joined
Jun 12, 2007
Messages
211
I am trying to make a range of cells highlight if the number in their cell is a lower % than cell C15. The other condition is that cell n21 or u 21 have to have a value greater than 0. I'm not sure how I can write this in the conditional formatting rules.

Can anyone give me an example of what i should enter?

Thanks
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
So I figured out how to apply it to one cell, if I put an if statement. Like in A21, if(and(a21<c15,or(c21>0,n21>0)).

My problem is I need to remove the A21 so that the format looks at the current cell, not always refers to a21, but maybe a30 or a40.
 
Upvote 0
So I figured out how to apply it to one cell, if I put an if statement. Like in A21, if(and(a21<C15,OR(C21>0,n21>0)).

My problem is I need to remove the A21 so that the format looks at the current cell, not always refers to a21, but maybe a30 or a40.
What version of Exel are you using?

What is the EXACT range of cells that you want to format?
 
Upvote 0
Excel Workbook
CDEFGHIJKLMNOPQRSTU
615%76%98%91%18%
762%20%36%11%49%
827%57%99%43%45%
950%9%65%3%85%
1027%52%0%44%24%
1170%96%14%74%13%
1221%44%79%94%15%
1337%51%49%25%88%
1422%93%71%63%90%
1525%55%77%62%38%96%
1622%30%45%73%14%
17
18
19
20
2104
Sheet9
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E61. / Formula is =AND(E6<$C$15,OR($N$21>0,$U$21>0))Abc


Select the whole range E6:I16, top left to bottom right, so that E6 is the active cell, then in the Use Formula section of Conditional Formatting enter the formula shown, choose your format and OK. You can see in the formula a single reference to E6, if your range is different then select as instructed, but substitute the top left cell address (make sure there are no $ symbols for that one cell reference) for E6.

It's not clear whether you mean N21 AND U21 need to be greater than 0 or just one of them, so this may not be right as I've guessed that you meant either one or the other had to be greater than 0.
 
Upvote 0
I'm using excel 2007

The exact range of cells is AN21:AN120. If N21 or U21 is greater than 0 than I need the format.

an example:

if an21 is less than c15 and n21 is greater than 0 format an21

if an31 is less than c15 and u31 is greater than 0 format an31

Also N21:n120 and u21:u120 will be the reference to the an21:120, like n40 and u40 will be referencing an40
 
Last edited:
Upvote 0
The formula I have now looks something like this:

=AND(AN21<$C$15,OR($N21>0,$U21>0))

The format still is not changing. Could it be because cell c15 and an21:120 are %?
 
Last edited:
Upvote 0
it seems fine here:
Excel Workbook
CKLMNOPQRSTUVAN
1550%
16
17
18
19
20
214460%
224416%
230442%
240495%
250477%
260460%
270439%
284090%
294054%
304028%
314041%
324084%
330069%
340095%
350036%
360095%
370046%
380018%
390074%
400027%
410050%
424477%
43442%
444485%
45443%
464482%
474496%
Sheet
Cells with Conditional Formatting
CellConditionCell FormatStop If True
AN211. / Formula is =AND(AN21<$C$15,OR($N21>0,$U21>0))Abc
 
Upvote 0
Thanks for your help p45cal.

Don't know why, I restarted my comp and reentered the formula and it works. Weird.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,750
Members
452,940
Latest member
rootytrip

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