Highlight Row when selected

C

cassy01

hi is it possible to highlight a row when you select a cell on a row.

For example I select B28, the row B becomes highlighted, then when
click on B29 that one becomes highlighted and B28 become
un-highlighted.

The only cells on each row i wont highlighting is B:I.

Thanks :
 
D

Don Guillett

right click sheet tab>view code>insert this>SAVE

'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