Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Combine Conditional Formatting Rules

0

Is it possible to use a "single" conditional formatting formula to highlight multiple columns a user must input based on their input into an initial column?

Here's what I'm trying to do.  If a user inputs data into column B (e.g., cell B2), an entry would be required in the corresponding cells on row2 in 6-columns C, D, E, F, I, and M.  The conditional formatting would highlight the 6-cells.  Once the user provides the input into a required cell, the conditional formatting highlight would disappear for that particular cell, leaving the other 5-cells highlighted until an enter for each of the remaining cells.  With each subsequent required entry, the conditional formatting highlight would disappear for that cell.

I can do this using 6-rules, one conditional formatting rule in each of the 6-required columns:

=AND(ISBLANK($C2),NOT(ISBLANK($B2)))

But, I'm curious if there is a way to combine rules and apply a "single" conditional formatting rule to all 6-columns.  I've tried various combinations, but I've failed to crack the code (assuming this is possible).

I would greatly appreciate any help or thoughts.

Answer
Discuss

Answers

0
Selected Answer

Select the cells that you want to be highlighted and use this formula:

=AND(ISBLANK(C$2),NOT(ISBLANK($B$2)))

You had the dollar signs in the wrong place; if they are in front of the column, then they won't change when you copy the formula to other columns.

Now, just select all of the cells you want to highlight, add the conditional formatting rule, hit OK and everything should be good.

Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login