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

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.
 
G

Gord Dibben

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
 

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