![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 6
|
I view data over 3 Screens (wide). What I want to be able to do is highlight the whole row I am currently on so I can refer to data in different columns. IE I am in cell AA9 and I want to easily see what data is in cell D9. I have used alternate row highlighting, but it would be nicer if when I moved up and down the rows the current row was highlighted and previous row I was on de-highlighted.
|
|
|
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi UK_Excel
Right click on the sheet name tab and select "View Code" then paste in this. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Row > 1 Then Target.Offset(-1, 0).EntireRow.Interior.ColorIndex = xlNone Target.EntireRow.Interior.ColorIndex = 6 End If End Sub |
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Posts: 6
|
Thanks Dave. That's Perfect. I modified the code slightly to include moving up as well as down.
Target.Offset(1, 0).EntireRow.Interior.ColorIndex = xlNone Thanks Again |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|