protecting a range of raws and columns with formula in Excel sheet

  • Thread starter Thread starter Observer
  • Start date Start date
O

Observer

I need help in protecting a range of raws and columns with formula in Excel
sheet.

An Excell Workbook contains 14 sheets (12 for each month, one for yearly
total and one for description)

More than 2000 employees use it. So I would appreciate if you could help me
to do it using Macro or similar quick method.
 
You want to protect the same ranges on each of the 14 worksheets?

Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim N As Single
For N = 1 To Sheets.Count
With Sheets(N)
.Cells.Locked = False
.Range("A1:B14").Locked = True 'adjust range to suit
.Protect Password:="justme"
End With
Next N
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP
 
Back
Top