conditional macros

  • Thread starter Thread starter Crystal
  • Start date Start date
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
 
Use conditional formatting to make it automatic
format>conditional format>go from there
 
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
 
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?
 
Back
Top