I have a 2 dimensional array and I would like to have the column and row header cells change color when the intersecting cell is selected.
I've been trying to build it as a Function that I put in the "Formula is" selecion of the conditional formatting, but, I can't seem to get it right.
Here is my code....
Function Selected(rCell As Range) As Boolean
Dim rC As Range
Dim bool As Boolean
Set rC = rCell.Cells
For Each rC In rCell
If rC.Address = ActiveCell.Address Then
Selected = True
Exit For
Else
Selected = False
End If
Next
End Function
Thanks,
Scott
I've been trying to build it as a Function that I put in the "Formula is" selecion of the conditional formatting, but, I can't seem to get it right.
Here is my code....
Function Selected(rCell As Range) As Boolean
Dim rC As Range
Dim bool As Boolean
Set rC = rCell.Cells
For Each rC In rCell
If rC.Address = ActiveCell.Address Then
Selected = True
Exit For
Else
Selected = False
End If
Next
End Function
Thanks,
Scott