Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Sorting Data on Protected Worksheets.

Sorting Data on Protected Worksheets

by Allen Wyatt
(last updated August 29, 2015)

6

When you protect a worksheet, Excel stops users from performing a wide variety of tasks on the data in the worksheet. One of the things that the user can no longer do is to sort data. What if you want the user to be able to sort data, but still have the sheet protected?

The answer is quite easy: Excel allows you to specify what users can and cannot do with a protected worksheet. When you display the Review tab of the ribbon and click Protect Sheet in the Changes group, Excel displays the Protect Sheet dialog box. At the bottom of the dialog box is a long list of check boxes. All you need to do is select what the user should be able to do with the worksheet. One of the options (you need to scroll down a bit) is Sort. If you select this option, then users can sort protected data.

There is a big caveat to keep in mind: All of the cells that will be involved in the sorting (or potentially involved in the sorting) must be unlocked. This includes any column headings for the data that may be sorted.

Before locking the worksheet, select all the cells that you want people to be able to sort. (A great way to do this is to select one of the cells then press Shift+Ctrl+8. The selected region is what Excel thinks should be sorted when a sort is done.) With those cells still selected, display the Protection tab of the Format Cells dialog box and clear the Locked check box. Now protect your worksheet and make sure you allow for sorting in the protection specifications.

If you fail to unprotect all the cells that may be involved in the sorting (even a single cell), then Excel won't allow sorting the data on the protected worksheet, even if you've instructed it to allow sorting.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (137) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Sorting Data on Protected Worksheets.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Calculating Expressions

Word can do some simple calculations for you, if you add a little-known tool to your toolbar. Here's how to add and use this ...

Discover More

Keyboard Changes to Unwanted Foreign Language

There you are typing along, minding your own business, when wham! You end up in an entirely different language and you don't ...

Discover More

Restoring a Keyboard Shortcut

Word uses keyboard shortcuts for all sorts of tasks. Sometimes you may create a shortcut that messes up one of the other ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Controlling Sorting Order

When you sort information in a worksheet, you have control over the order in which that information is sorted. Here's a quick ...

Discover More

Sorting with Graphics

If you use graphics in a worksheet that are associated with certain cells (perhaps images of parts or icons for worksheet ...

Discover More

Recognizing a Header Row when Sorting

When you sort data in a worksheet, there are a couple ways you can do it. Using the simple way can result in unsatisfactory ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 8Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 0 + 7?

2016-11-23 11:30:49

Linda Bias

I have followed the instructions on how to sort in a protected worksheet, and it is not working. Any other hints?


2016-08-16 14:39:44

Ismael Torres

Vicky, only leave the headers unlocked. The data cells can remain locked. In the Protect Sheet dialog check the cells to allow sorting and filtering so that these actions can be performed.
Still this has another implication which is the inability of reordering columns, but hopefully you can get by without that.


2016-07-05 10:40:29

Vicky

The only problem with this method is that this then lets the users edit the formulas in the cells which is what I need to prevent. Is there anyway to lock the cell formulas but allow the sorting?


2016-01-21 13:29:19

Philip Kogan

I want to distribute worksheets with some blank columns that the users will enter data into. I do not want them to be able to change data in the columns that are already populated so I assume those cells/columns need to be locked.
But I want them to be able to sort the entire worksheet.
Is this possible? How do I do it? (I do not want to use a macro and have a link they have to click before sorting).
Thank you for your time and any help


2016-01-17 23:05:45

mahrus

how to download example file?


2015-12-08 08:03:59

Jesenko Sokoljak

Works also in Excel 2003 but the header must be unlocked as well.
In Excel 2003 Ctrl-A selects the region.


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.