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

Getting Rid of the "Enable Macros" Notice

Do you get tired of the dialog box that says "do you want to enable macros" that is displayed when you open a workbook. You ...

Discover More

Preparing Data for Import into Access

When importing Excel information into Access, you need to be concerned with the condition of the data. Here's how to make ...

Discover More

Alphabetizing Worksheet Tabs

As you get more and more worksheets into a workbook, you'll find yourself moving them around into different sequences. You ...

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)

Creating a Sort Order

Excel is very flexible in how it can sort your data. You can even create your own custom sort order that is helpful when ...

Discover More

Sorting Text as Numbers

When you are sorting by text values, Excel can be very literal, which may not get you the sorting that you want. This tip ...

Discover More

Sorting IP Addresses

If you keep track of IP addresses in an Excel worksheet, you probably already know that it is difficult to sort those ...

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 6Mpixels. 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 two less than 2?

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.