Reading Data Rows

Uk_Excel

New Member
Joined
Mar 7, 2002
Messages
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.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top