conditional macros

C

Crystal

I have a worksheet that I need to run a macro on where, if certain
cells are blank, then I want to color them yellow. They all start out
pink (required input). I want to then run the macro again and if any
of the yellow cells has then had input put in, then it needs to be
changed back to pink, and any pink cells that no longer have data in
them, need to be turned to yellow.

Any clues?

Crystal
 
D

Don Guillett

Use conditional formatting to make it automatic
format>conditional format>go from there
 
C

Crystal Owings

Unfortunately, there are more than 3 conditions, and it needs to be a
macro. We've now, also, run into the problem of validation within that
macro, and also validating numbers from other worksheets.

I'm just looking for some snippits of code, so that I can work from
there

Crystal Owings


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
D

Don Guillett

Sub chgcolor()

For Each c In [a1:c6]
If Len(c) > 0 Then c.Interior.ColorIndex = 6
If Len(c) = 0 Then c.Interior.ColorIndex = 7
Next
End SubOK. Will this help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top