excel数据透视表_Excel数据透视表排序问题

excel数据透视表

Usually, it’s easy to sort an Excel pivot table – just click the drop down arrow in a pivot table heading, and select one of the sort options. Occasionally though, you might run into pivot table sorting problems, where some items aren’t in A-Z order.

通常,对Excel数据透视表进行排序很容易–只需单击数据透视表标题中的下拉箭头,然后选择一种排序选项即可。 但是,有时您可能会遇到数据透视表排序问题,其中某些项目不是按AZ顺序排列的。

《excel数据透视表_Excel数据透视表排序问题》

数据透视表排序问题 (Pivot Table Sorting Problems)

In some cases, the pivot table items might not sort the way that you’d expect. In this example, there are sales representative names in column A, and they have been sorted alphabetically, A-Z.

在某些情况下,数据透视表项可能无法按照您期望的方式排序。 在此示例中,列A中有销售代表姓名,并且已经按字母顺序对它们进行了排序。

However, after sorting the items, Jan is at the top of the list, instead of Ann. The rest of the items are sorted correctly, but Jan is the exception.

但是,对项目进行排序后,Jan在列表的顶部,而不是Ann。 其余项目已正确排序,但Jan例外。

《excel数据透视表_Excel数据透视表排序问题》

NOTE: There are more pivot table sorting tips on my Contextures website.

注意我的Contextures网站上更多数据透视表排序提示

为什么排序不正确 (Why the Sort is Incorrect)

In this example, Jan is at the top of the list, because Excel assumes Jan means January, and “Jan” is in one of Excel’s built-in custom lists.

在此示例中,Jan在列表的顶部,因为Excel假定Jan表示Jan,而“ Jan”在Excel的内置自定义列表之一中

There are built-in custom lists of weekday names and month names — both the full names (January, February, etc.), and 3-letter versions (Jan, Feb, Mar, etc.).

有内置的自定义工作日名称和月份名称列表-全名(一月,二月等)和三字母版本(一月,二月,三月等)。

In addition to the built-in custom lists, you can also create your own custom lists, such as districts, or departments, or other lists of items.

除了内置的自定义列表,您还可以创建自己的自定义列表,例如地区,部门或其他项目列表。

自定义列表和数据透视表 (Custom Lists and Pivot Tables)

By default, Excel’s custom lists take precedence when you’re sorting labels in a pivot table. The built-in lists and the custom lists that you create, will both affect the pivot table sorting.

默认情况下,在对数据透视表中的标签进行排序时,Excel的自定义列表优先。 您创建的内置列表和自定义列表都将影响数据透视表的排序。

Fortunately, if things don’t sort the way that you need them to, you can fix the problem, by changing a pivot table setting.

幸运的是,如果事情没有按照需要的方式进行排序,则可以通过更改数据透视表设置来解决问题。

修复数据透视表排序问题 (Fix Pivot Table Sorting Problems)

To prevent the custom lists from taking precedence when sorting a pivot table, follow these steps to change the setting:

要防止自定义列表在对数据透视表进行排序时优先,请按照以下步骤更改设置:

  1. Right-click a cell in the pivot table, and click PivotTable Options.

    右键单击数据透视表中的单元格,然后单击“数据透视表选项”。

  2. In the PivotTable Options dialog box, click the Totals & Filters tab.

    在“数据透视表选项”对话框中,单击“总计和筛选器”选项卡。

  3. In the Sorting section, remove the check mark from “Use Custom Lists When Sorting”

    在“排序”部分,从“排序时使用自定义列表”中删除复选标记

《excel数据透视表_Excel数据透视表排序问题》

正确排序 (Sorting Correctly)

After you adjust that pivot table setting, the list of names changes, and Ann is shown at the top, instead of Jan.

调整数据透视表设置后,名称列表将更改,并且Ann显示在顶部,而不是Jan。

《excel数据透视表_Excel数据透视表排序问题》

更多数据透视表排序提示 (More Pivot Table Sorting Tips)

If this tip didn’t fix your sorting problem, go to the Pivot Table Sorting page on my Contextures site. There’s more information there, to help you fix sorting problems and macros to make sorting easier.

如果此技巧不能解决您的排序问题, 请转到Contextures网站上的“数据透视表排序”页面 。 那里有更多信息,可帮助您解决排序问题和宏,从而使排序更加容易。

翻译自: https://contexturesblog.com/archives/2011/09/30/excel-pivot-table-sorting-problems/

excel数据透视表

    原文作者:culiao2169
    原文地址: https://blog.csdn.net/culiao2169/article/details/107992599
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞