mclambchop
New Member
- Joined
- Apr 29, 2014
- Messages
- 24
- Office Version
- 365
- Platform
- Windows
Hello, I would like to highlight an entire row in a different colour if the use selects any cell within that row. I have cobbled together the code below which works but it doesnt select the entire row (where there is data, not the entire row) and it changes the colour of the entire column. Could someone help me change the code?
'Range(Cells(5, 10), Cells(5051, 8)).Interior.ColorIndex = xlNone
'If Target.Row >= 5 And Target.Row <= 5051 Then
' Cells(Target.Row, 8).Interior.ColorIndex = 1
'End If
'Range(Cells(5, 10), Cells(5051, 8)).Font.ColorIndex = 1
'If Target.Row >= 5 And Target.Row <= 5051 Then
' Cells(Target.Row, 8).Font.ColorIndex = 2
'End If
'Range(Cells(5, 10), Cells(5051, 8)).Interior.ColorIndex = xlNone
'If Target.Row >= 5 And Target.Row <= 5051 Then
' Cells(Target.Row, 8).Interior.ColorIndex = 1
'End If
'Range(Cells(5, 10), Cells(5051, 8)).Font.ColorIndex = 1
'If Target.Row >= 5 And Target.Row <= 5051 Then
' Cells(Target.Row, 8).Font.ColorIndex = 2
'End If