highlight (clolour) select rows

C

cathal

Dear all,

how can I automatically highlight a row as I scroll down? I'd like th
text in the row to become bold, and the backround colour in the cell t
turn yellow. As I move to the next row text becomes bold, backgroun
colour turns yellow, with the previous row reverting to what i
currently is.

I hope this makes sense - many thanks, catha
 
D

Don Guillett

right click sheet tab>view code>insert this

'McCurdy.Here is something inspired by Don Guillett.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim MyRng As Range
Set MyRng = Target.EntireRow
Application.EnableEvents = False
On Error GoTo end1
Application.Cells.FormatConditions.Delete
With MyRng
.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=ROW()=ROW(INDIRECT(CELL(""address"")))"
With .FormatConditions(1).Font
.Bold = True
.Italic = False
.ColorIndex = 1
End With
.FormatConditions(1).Interior.ColorIndex = 36
End With
end1:
Application.EnableEvents = True
End Sub
 
Top