re-post
This is a sample for row 7. The value goes in A7. The color tested for is
green #10:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("A7").Value = 0
For i = 1 To Columns.Count
If Cells(7, i).Interior.ColorIndex = 10 Then
Range("A7").Value = 1
Exit Sub
End If
Next
End Sub
This goes in the Worksheet code area not a standard module. Once you have
colored a cell, move away from it to tell the routine you are done.
--
Gary''s Student - gsnu200722
|