Excel: lock sheet, but keep tables expandable

microsoft excel

My goal is to protect a sheet, but make users able to edit and add rows to the contained tables.

When I try to protect the sheet with no cells locked, the tables become unable to add rows even though their cells are not locked. I have tried to check all the Allow all the users of this worksheet to checkboxes, but it does not help me.

Does anybody know of a work around or will I need to create an Insert Row button with associated VBA to make this work?

Best Answer

You can use a macro to make changes on locked worksheets. For example:

Sub MyMacro()
Sheet1.Unprotect Password:="Secret"
  'YOUR CODE HERE
Sheet1.Protect Password:="Secret"
End Sub

Please read this article for more about running macros on protected worksheets.

If you need help on writing the macro, you can ask for help on our sister site StackOverflow.

Related Question