Lock The Required Range
Lock the required Range and Unlock the remaining worksheet by using VBA Macros
Sub Protect_The_Required_Range_Or_Cells()
ActiveSheet.Cells.Locked = False
ActiveSheet.Range("D4:F9").Locked = True
ActiveSheet.Protect "abcd"
End Sub
Sub Unlock_The_Worksheet()
ActiveSheet.Unprotect "abcd"
End Sub