How to Sort a Protected Table

myfathersson

New Member
Joined
May 4, 2010
Messages
22
Hi.

I'm using 2007. I want to protect worksheets containing tables to prevent inadvertant changes. However, I want to be able do things like sort tables using the filter dropdowns in the table column header row.

All cells are locked. Using the Protect Sheet dialogue from the Changes section of the Review tab, I selected a number of items in the "Allow users ...to" list, including Sort. My assumption was that the user would be able to sort the table, but Excel will not allow this. I can, however, filter.

Am I missing something? Can I sort a table in a protected, locked sheet? If not, what is the purpose of the "Allow users...to" list in the Protect Sheet dialogue? If so, how do I do it?
 
Last edited:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
OK. I finally found my answer on the forum...just had to get the search criteria right. And the answer is...no, you cannot sort a protected, locked sheet.

Rant on.

Frankly, I think MS dropped the ball on the Protect Sheet dialogue. It really appears that you are telling Excel to allow users to perform the checked items on protected, locked cells, but, apparently, that is not what it means at all. So, if that's not what they are for, then what are they for? If they only work on unlocked selected cells, what's the use? I guess I'm just not getting it.

Rant off. :)
 
Upvote 0
You can record sorting on the unprotected sheet, then call that code from a button.

In the code you can add:

ActiveSheet.Unprotect "PasswordHere"
' Sort code
ActiveSheet.Protect "PasswordHere"

HTH,
 
Upvote 0
Smitty,

Thanks very much. I'm not sure what to put in the "sort code". I sort on a variety of table columns depending on what I'm doing. Will the code you were thinking of be able to allow me to sort on one or more columns of my choosing? What I did was set up button to quickly unlock and lock the sheets. So I unlock, sort, the lock again.
 
Upvote 0

Forum statistics

Threads
1,215,420
Messages
6,124,803
Members
449,190
Latest member
cindykay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top