This video demonstrates how to restrict editing to specific cells using the ScrollArea worksheet property in Microsoft Excel. A VBA macro is used to specify the ScrollArea on each sheet.
The VBA code is triggered by the Workbook Open event.
You can download the featured file here. It does not contain the code (which you can copy below) as I cannot upload macro enable workbooks to this website.
Here’s the code featured in the video. The ScrollArea can be defined either with a named range or by specifying a range as you would in a worksheet formula – see examples in the code. Don’t forget the code must be stored in the Workbook object.
Private Sub Workbook_Open() Worksheets("Sales").ScrollArea = "B2:G11" Worksheets("Fitness").ScrollArea = "FitnessEditArea" End Sub