Link to home
Start Free TrialLog in
Avatar of Sheldon Livingston
Sheldon LivingstonFlag for United States of America

asked on

Can you AND / OR coloring in Excel via VBA

Imagine that I have rows 10 - 100 where the cells either have no color or a color of blue.

I'd like to add a macro that will turn the clear cells into red (for instance).

It would be neat if the following worked:

sheetname.range(startRow, endRow).Interior.ColorIndex = red AND blue (or red NOT blue, etc)

The thought would be if the cell was blue it'd stay blue else red.

Don't want to loop through each row and determine if it is blue and then make it red if not... have too many columns to do this with.
ASKER CERTIFIED SOLUTION
Avatar of Saurabh Singh Teotia
Saurabh Singh Teotia
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sheldon Livingston

ASKER

Wow!  Perfect.  Thanks