Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Static OldRange As Range
On Error Resume Next
Target.Font.ColorIndex = 6 ' yellow - change as needed
'For permanent change, delete the two rows below
OldRange.Font.ColorIndex = xlColorIndexNone
Set OldRange = Target
End Sub
That's because that isn't what you asked for.That works fine, but only on one cell at a time. I want the whole rows font to change colour when you activate any cell in the row. see table.
It works on a whole range at a time (if you select mutliple cells, it will work on multiple cells).Can someone help with code to change font colour of a range when a cell in the range is clicked