highlight rows for easier reading

  • Thread starter Thread starter suesolotel
  • Start date Start date
S

suesolotel

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?
 
Just click on the row identifier on the extreme left - the whole row
will be highlighted.

Hope this helps.

Pete
 
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
 
that was great! my eyes thankyou

Mike H said:
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
 
Wow...pasting that code was really great.
How would you make that into a macro to run whenever you want?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top