sorting protected sheets

E

esslingerdav

I have a worksheet that has a column of locked cells but all the rest are
unlocked. I want all the locked cells protected to keep multiple users from
messing up formulas. Is there a way to sort this sheet after it is
protected? I am having to unprotect the sheet everytime I want to resort the
data. thanks!
 
K

kassie

You can use a macro to do this for you

Sub Sorter()
ActiveSheet.Unprotect
'You can specify a password to use for the unprotection
Range("insert your range").Select
Selection.Sort Key1:=Range("mayebe the first cell of the range, else the
column you want to sort by"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True 'You can also add a password here
End Sub
 

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