View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default conditional macros

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?

"Crystal" wrote in message
m...
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