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

Checking for Words and Phrases

You may want to determine if a document contains a certain set of words or phrases. There are a couple of ways you can make ...

Discover More

Selective Formatting in Replacements

Do you need to replace text with a term or phrase that uses multiple formats? You can perform this seemingly complex task ...

Discover More

Running a Macro when a Worksheet is Deactivated

When you change from one worksheet to another, you may want to have Excel automatically run a macro for the worksheet you are ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Can't Sort Imported Data

Import information from an external database, and you'll no doubt want to use Excel's simple tools to manipulate that data. ...

Discover More

Ignoring Selected Words when Sorting

If you use Excel to maintain a list of text strings (such as movie, book, or product titles), you may want the program to ...

Discover More

Sorting by Colors

Need to sort your data based on the color of the cell or the color of the text within the cell? Excel makes it easy to do the ...

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. 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 six less than 6?

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.