简体   繁体   English

在受保护的Excel工作表上排序

[英]Sorting on a protected Excel sheet

i have an excel related problem. 我有一个与excel相关的问题。 I already searched older questions but neither of them have a good anwser for the problem. 我已经搜索了较旧的问题,但他们都没有对这个问题有好的反应。

I want to be able to sort, filter and use pivot tables on a protected sheet. 我希望能够在受保护的工作表上对数据透视表进行排序,过滤和使用。 I researched so far that one can not sort on a protected sheet. 到目前为止,我研究过一个人无法对受保护的纸张进行排序。 But is there a way to unlock the sheet for sorting and then lock it again after successful sorting? 但有没有办法解锁表单进行排序,然后在成功排序后再次锁定它?

thx in adavance thx in adavance

In general, you can choose things to allow when you protect a sheet, such as filtering (when you click on "Protect Sheet", there is a list titled "Allow all users of this worksheet to:"). 通常,您可以选择在保护工作表时允许的内容,例如过滤(当您单击“保护工作表”时,会有一个标题为“允许此工作表的所有用户:”的列表)。

With sorting, it really depends on whether the cells in the table are locked or not. 通过排序,它实际上取决于表中的单元格是否被锁定。 If not, it works just by allowing it in the protection menu. 如果没有,它只是在保护菜单中允许它。 If some are locked, there is a workaround with 如果有些人被锁定,有一个解决方法

Review (Ribbon) > Allow users to edit ranges 查看(功能区)>允许用户编辑范围

whilst disallowing selection of locked cells. 同时禁止选择锁定的细胞。 Here you basically add the locked ranges of your table to the "editable" ranges, but at the same time you disallow users to click on them, so that they stay in fact uneditable. 在这里,您基本上将表的锁定范围添加到“可编辑”范围,但同时您不允许用户单击它们,以便它们实际上不可编辑。 But this method does come with its drawbacks, I'm sure you can find more details on google. 但是这种方法确实有它的缺点,我相信你可以在google上找到更多细节。

About pivot tables, try checking the option "Use pivot table reports" in the list when locking the worksheet. 关于数据透视表,请在锁定工作表时尝试检查列表中的“使用数据透视表报告”选项。

You'll need to right click on the filter cells > Format cells > Protection tab > untick 'Locked'. 您需要右键单击过滤器单元格>格式单元格>保护选项卡>取消勾选'已锁定'。 Then protect the worksheet tick the options to 'Sort', 'Use Autofilter', 'Use PivotTable reports'. 然后保护工作表勾选“排序”,“使用自动过滤”,“使用数据透视表报告”选项。 This will allow the user to sort, filter etc but will also allow them to edit the cells directly ie not just using the sort button. 这将允许用户进行排序,过滤等,但也允许他们直接编辑单元格,即不仅仅使用排序按钮。 You could untick the 'Select locked cells' option when you protect the worksheet to prevent this direct editing. 保护工作表以阻止此直接编辑时,可以取消选中“选择锁定的单元格”选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM