This time I tested the code. And added multi-select capabilities. Let me know what you think
Option Explicit
Private PreviousChange As Range
'
' Activate here
' Before Doubleclick here
'
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count = 1 And Target.Row = 1 Then Exit Sub
If Target.Column < 9 Then
restoreformat Target
customformat Target
End If
End Sub
Sub customformat(ByVal Target As Range)
Application.ScreenUpdating = False
Application.EnableEvents = False
Dim Cel As Range
For Each Cel In Target
If Cel.Row = 1 Then GoTo CelNext
With Intersect(Rows(Cel.Row), Range("A:H"))
.Borders(xlEdgeTop).Weight = xlMedium
.Borders(xlEdgeTop).Color = RGB(62, 188, 222)
.Borders(xlEdgeBottom).Weight = xlMedium
.Borders(xlEdgeBottom).Color = RGB(62, 188, 222) 'RGB(79, 194, 225) 'RGB(73, 205, 184)
.Font.Bold = True
End With
With Intersect(Rows(Cel.Row), Range("A:D"))
.Font.Color = RGB(20, 77, 146)
End With
CelNext:
Next Cel
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Sub restoreformat(ByVal Target As Range)
Application.ScreenUpdating = False
Application.EnableEvents = False
Dim Cel As Range
If Not PreviousChange Is Nothing Then
For Each Cel In PreviousChange
If Cel.Row = 1 Then GoTo CelNext
With Intersect(Rows(Cel.Row), Range("A:H"))
.Borders.LineStyle = xlNone
.Font.FontStyle = "Regular"
End With
CelNext:
Next Cel
End If
Set PreviousChange = Target
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub