Try this revision............adjust password to suit.
Unprotects the sheet, autofits the rows then re-protects the sheet.
Private Sub Worksheet_Calculate()
Const rngrows As String = "F11:F14, F16:F20, F22:F24"
On Error GoTo endit
Application.EnableEvents = False
ActiveSheet.Unprotect Password:="justme"
Range(rngrows).EntireRow.AutoFit
endit:
ActiveSheet.Protect Password:="justme"
Application.EnableEvents = True
End Sub
Gord