OzGrid

How to do conditional formatting based on another cell having data

< Back to Search results

 Category: [Excel]  Demo Available 

How to do conditional formatting based on another cell having data

 

Requirement

The user is trying to set up a rule to highlight a cell based on if it is blank (and it shouldn't be if another cell related to it is not blank.)

So for example if B2 in the attached has an Item in it but C2 is blank then the user wants to highlight this in a colour.

 

Solution:

Code:
=AND($B2<>"",$C2="")

In order to see it within your worksheet :

place your cursor in cell C2, then

from the main menu : Home > Conditional Formatting > Manage Rules > Edit Rule

in a hurry : the shortcut : ALT O D

 

Obtained from the OzGrid Help Forum.

Solution provided by Carim.

 

See also: Index to Excel VBA Code and Index to Excel Freebies and Lesson 1 - Excel Fundamentals and Index to how to… providing a range of solutions and Index to new resources and reference sheets

 

See also:

How to use VBA to find and replace or If/Then with conditional formatting
How to add a second condition to conditional formatting

 

Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.


Gallery



stars (0 Reviews)