Use this code:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim val As String
Application.ScreenUpdating = False
If Target.Column = 2 And Target.Row >= 9 And Target.Row <= 1000 Then
val = Target.Value
If val <> "" Then
With Range("AX" & CStr(Target.Row) & ":BY" & CStr(Target.Row))
.Borders.LineStyle = xlContinuous
.Interior.Color = 65535
End With
ActiveWindow.ScrollColumn = 50
Else
With Range("AX" & CStr(Target.Row) & ":BY" & CStr(Target.Row))
.Borders.LineStyle = xlNone
.Interior.Pattern = xlNone
End With
ActiveWindow.ScrollColumn = 13
End If
Else
Exit Sub
End If
End Sub
Paste it on the corresponding sheet tho, like in the example. Check it to see the working macro.
Example1.xlsm
Bookmarks