View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default highlight rows for easier reading

Hi,

I can't remember where I got this code so apologies and thanks to the
original author. Right click the sheet tab, view code and paste this in

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Static Old As Range
Static colorindxs(1 To 256) As Long
Dim i As Long
If Not Old Is Nothing Then
With Old.Cells
If .Row = ActiveCell.Row Then Exit Sub
For i = 1 To 256
.Item(i).Interior.ColorIndex = colorindxs(i)
Next i
End With
End If
Set Old = Cells(ActiveCell.Row, 1).Resize(1, 256)
With Old
For i = 1 To 256
colorindxs(i) = .Item(i).Interior.ColorIndex
Next i
.Interior.ColorIndex = 36
End With
End Sub

Mike

"suesolotel" wrote:

hi when i am checking data entry in a spreadsheet with a lot of information i
am having trouble keeping my on the row i am reading - is there a way you can
set the rows to shade in grey or similar so as you arrow down your eye is
always drawn to the current row you are reading?