Activate Condition When Another Cell Is Selected
Assuming the grid where the people are marks as present ia named range
called data, and you mark them with an x
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim cell As Range
If Target.Column = 1 Then
Me.Range("data").Cells.Interior.ColorIndex = xlColorIndexNone
For Each cell In Me.Range("data").Rows(Target.Row -
Me.Range("data").Cells(1, 1).Row + 1).Cells
If cell.Value = "x" Then
cell.Interior.ColorIndex = 38
End If
Next cell
End If
End Sub
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"T Tran" wrote in message
...
Is it possible to have conditions on cells that activate upon another cell
being selected?
For example:
Column A contains dates;
Row 1 contains personnel names;
Data reflects personnel's attendance;
If a date is selected, is it possible to have the cells (of the personnel
who are present) highlighted and bold based on whether or not they are
present?
|