Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. 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.
Written by Allen Wyatt (last updated October 10, 2020)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
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 Protect group (Changes group in earlier versions of Excel), 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.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (137) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Sorting Data on Protected Worksheets.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
Sorting information in a worksheet can be confusing when Excel applies sorting rules of which you are unaware. This is ...
Discover MoreOne of the strong features of Excel is its ability to sort information in a worksheet. When it doesn't sort information ...
Discover MoreSorting by dates is easy, and you end up with a list that is in chronological order. However, things become a bit more ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-02-25 20:43:05
Kelly A
what good is protecting a sheet if you have to unlock cells in order to allow sorting? i have an input table, some columns locked and some not so user can enter info. i would like to allow them to sort the table but i still need the cells protected!
2020-10-11 10:31:38
David Gray
This tip explains something that has puzzled me since I began using locked sheets to protect formulas against accidental changes.
From my point of view, this limitation effectively renders sorting unusable on protected worksheets.
2020-10-10 23:00:12
Col Delane
This has always been a pretty useless feature, for it assumes that the entire contents of the range to be sorted (often a "database" of some kind) consists of input data, when often spreadsheet builders create databases that are a mix of values and formula, the latter of which they wish to Lock so the client users cannot change them.
The workaround is to write a macro that unprotects the sheet (so the Lock status of any cell is temporarily render inactive), then sorts the range, then reprotects the sheet.
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments