high light the selected cell

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

I have a very big spread sheet. Each row goes across 15 cells. How can I have
the row outline in a different color to show what row i'm on and once I tab
to the cell I need how do I get the colunm outlined in a different color
 
Here's a little home grown highlighter that highlights the row of a selected
cell in a range of cells, in this case Range("B8:K22"). Range and color of
highlight can be changed of course.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Data As Range
Dim i As Integer
Dim j As Integer
Dim k As Integer
i = 2
j = 8
k = ActiveCell.Column()
Set Data = Range("B8:K22")

Data.Interior.ColorIndex = xlNone

If ActiveCell.Row < 8 Or ActiveCell.Row > 22 Or _
ActiveCell.Column < 2 Or ActiveCell.Column > 11 Then
Exit Sub
End If

ActiveCell.Offset(0, -(k - i)). _
Resize(1, 10).Interior.ColorIndex = 35

End Sub

HTH
Regards,
Howard
 
Back
Top