You can try this (in the worksheet code module). Each time the selection changes, it checks up in the first column for content such as "Summary *": if the worksheet is not already frozen on this row, it will perform this setting.
One of the difficulties is that to scroll, you need to click on one of the lines in the top panel ...
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static lastFreeze As Long Dim c As Range, r As Long, sel As Range Set sel = Selection 'get the first cell on the selected row, then ' go up until find a content like "Summary*" Set c = Target.Parent.Cells(Target.Cells(1).Row, 1) Do While (Not c.Value Like "Summary*") And c.Row > 1 Set c = c.Offset(-1, 0) Loop 'need to switch freeze location? If c.Row > 1 And c.Row <> lastFreeze Then ActiveWindow.FreezePanes = False 'prevent re-triggering event Application.EnableEvents = False Application.GoTo c.Offset(-1, 0), True c.Offset(1, 0).Select ActiveWindow.FreezePanes = True sel.Select Application.EnableEvents = True lastFreeze = c.Row End If End Sub
source share