ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Highlight rows as you scroll through spreadsheet (https://www.excelbanter.com/excel-worksheet-functions/27744-highlight-rows-you-scroll-through-spreadsheet.html)

SilverCondor

Highlight rows as you scroll through spreadsheet
 
I want the rows to highlight as I scroll down the spreadsheet.
When I am at a cell on a 14 inch spreadsheet, I'd like the entire row
to highlight so I can easily distinguish data on that row without having to
go all the way over the the left.

Duke Carey

I tried conditional formatting, but it was unreliable, in that the display
didn't always update. Sometimes multiple rows were highlighted, other times
the active row wouldn't highlight.

VBA works OK, though. There seems to be quite a bit of overhead required for
this, meaning it perceptibly slows my system down.

Right click on the sheet tab and "View Code"
Paste in the code below

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = 0
Target.EntireRow.Interior.ColorIndex = 34
End Sub


"SilverCondor" wrote:

I want the rows to highlight as I scroll down the spreadsheet.
When I am at a cell on a 14 inch spreadsheet, I'd like the entire row
to highlight so I can easily distinguish data on that row without having to
go all the way over the the left.



All times are GMT +1. The time now is 10:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com