conditional formatting 2 rules

hopr37

Board Regular
Joined
Apr 16, 2018
Messages
76
Trying to use conditional formatting with 2 sets of rules.
Each time I try different rules ( using AND) it never works

All I'm trying to accomplish is:
If C4 has no value and D4 has a value then fill C4 with a color.
and down the line
If C5 has no value and D5 has a value then fill C5 with a color

But only If D4 has a value. If both cells C4 and C5 are blank then leave them blank
etc...
 
Last edited:

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Try this Conditional Formatting rule:
Code:
=AND(C4="",D4<>"")
 
Last edited:
Upvote 0
That does indeed work.
Is there a way to have the same outcome if the value in D4 is greater than "0"?
the way I have my sheet set up is that there may be a value in D4 ranging from "0" to whatever.
I have to blank out D4 to get C4 to remove the color.
In other words. As long as D4 has any value in it and C4 has no value then it will always fill C4.
something like "if D4>0 and C4= nothing then.....

is that possible?
 
Upvote 0
something like "if D4>0 and C4= nothing then.....
You have already practically written it yourself, especially seeing how I did the previous one. Just change out the conditions are you see fit.

I did:
D4<>""
which basically says D4 is not empty (contains something, can be a number, letter or space)

If you want to include any number greater than zero, just change it to:
D4>0

If you want to include zero as the number it may contain, then change it to:
D4>=0
 
Upvote 0
that's what I originally did but it kept giving me an error. I'll try again.

huh. It works now. I must of had a character missing or something. Thanks for the help
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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