Highlight Rows/Columns


Posted by Jo on January 07, 2002 7:06 AM

Is there a way to highlight the cell you're on so that you know where you're working at that exact time just by glancing at the sheet?



Posted by Tom Urtis on January 07, 2002 7:53 AM

Right click on your sheet tab, left click on View Code, and paste this in:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Cells.Interior.ColorIndex = -4142
Target.Interior.ColorIndex = 8
End Sub

Or, based on the subject line of your post:

Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Cells.Interior.ColorIndex = -4142
Target.EntireRow.Interior.ColorIndex = 8
Target.EntireColumn.Interior.ColorIndex = 8
End Sub

It will hilite the row and column you are in, with a shade of blue.

HTH

Tom Urtis