Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Highlight entire rows as I scroll?
As I scroll down the rows in Excel, the row number and the current cell are
highlighted. Is there a way to have the entire row be highlighted as I scroll? |
#2
|
|||
|
|||
Hi
Have a look here for an option: http://www.cpearson.com/excel/RowLiner.htm -- Andy. "blackrb1" wrote in message ... As I scroll down the rows in Excel, the row number and the current cell are highlighted. Is there a way to have the entire row be highlighted as I scroll? |
#3
|
|||
|
|||
Something like this will high light the row of any cell selected in the
range B8 to K22 from column B to K. You can change to meet your parameters. Copy and paste into the sheet module. I don't remember if I wrote this or picked it from the newsgroup, apologies to the author if not mine for not crediting him/her. 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 And one from J. E. that does the whole row and preserves any other color formatting on the sheet. ' J.E. McGimpsey 6/15/2001 Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) Static oldRange As Range Static colorIndices(256) As Integer Dim i As Integer If Not oldRange Is Nothing Then 'Restore color indices For i = 1 To 256 Cells(oldRange.row, i).Interior.ColorIndex = colorIndices(i) Next i End If For i = 1 To UBound(colorIndices) colorIndices(i) = Cells(ActiveCell.row, i).Interior.ColorIndex Next i ActiveCell.EntireRow.Interior.ColorIndex = 15 Set oldRange = ActiveCell.EntireRow End Sub HTH Regards, Howard "blackrb1" wrote in message ... As I scroll down the rows in Excel, the row number and the current cell are highlighted. Is there a way to have the entire row be highlighted as I scroll? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Isolate rows based on highlight (Excel 2003) | Excel Worksheet Functions | |||
In Excel, can I shade entire rows based on the value of a single . | Excel Worksheet Functions | |||
Help using Conditional Formating of Entire Rows | Excel Worksheet Functions | |||
Using PROPER for Columns, rows or ENTIRE spreadsheet | Excel Worksheet Functions | |||
Search should highlight entire row in Excell in red | Excel Discussion (Misc queries) |