PDA

View Full Version : Solved: Highlight row when a cell within it has been selected and 'un-highlight' when not



Panda
11-03-2010, 07:24 AM
Hi There,

I have a massive table of data which I am trying to make easier to read by highlighting the row for the cell that I have selected and then when I move to another cell the row returns back to blank and then when selecting another cell that active row is then highlighted.

Is there some VBA code that will help me do this?

Thanks in advance

Phil

Bob Phillips
11-03-2010, 08:07 AM
Add Conditional Formatting with a formula of

=ROW()=CELL("row")

and apply a fill colour.

Then right click the sheet tab, select view code and add



Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = True
End Sub

Jan Karel Pieterse
11-03-2010, 10:10 AM
Another appraoch is shown in this addin:
www.jkp-ads.com/download.asp#followcellpointer (http://www.jkp-ads.com/download.asp#followcellpointer)

Panda
11-03-2010, 10:17 AM
Thanks guys both examples work a treat =:)

Thanks again