Run macro when cell color changes

G

Guest

I have a worksheet with dates in row 1 spreading over several columns.
This range of dates is named TuitionDaysA.
Some of the dates are color coded (yellow).
I have created a macro that counts the cells in row 1 that are colored
yellow and have the result put in cell C13:
Sub ColorCountProgA()
yellow = 0
For Each Cell In Sheet1.Range("TuitionDaysA")
If Cell.Interior.ColorIndex = 6 Then
yellow = yellow + 1
Else
End If
Next
If yellow > 0 Then
Sheet1.Cells(13, 3).FormulaR1C1 = yellow
Else
End If
End Sub

How do I change this code so that when the color of a cell in row 1 changes,
C13 is automatically updated.
 
G

Guest

Sorry, color changes don't cause worksheet to update. therefore, you can't
do what you want to do.
 

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