Insert Copied Rows or Drag/Drop Formulas While Protected

V

veggies27

I am working with a worksheet that has the cells with formulas protected, to
prevent end users from modifying or overriding them (specifically column E).
My problem is I need to be able to add rows (Say 3 new rows between rows 1
and 2-which will mirror rows 1 and 2 exactly), and have the formulas in those
protected cells in the adjacent rows copied into the new rows. I can't copy
the existing row and "paste copied cells" to add the row with all the correct
formulas while the sheet is protected. I can insert a blank row, and in
theory drag and drop the 1 cell with a formula (E1) down to work in the new
row, but this is also not allowed while protected. Any suggestions?
 
G

Gord Dibben

Use a macro to unprotect, do your job then re-protect

Sub do_it()

ActiveSheet.Unprotect Password:="justme"

code to do your work

With ActiveSheet
.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
.EnableSelection = xlUnlockedCells
End With

End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top