Summary
You may see that the sorting on text column going strange like below.
The Left side is a normal data range. The right side is a pivot table that with source from A1:A7
Possible Cause
The problem has been caused by sorting with "custom list" under PivotTable.
The "Custom List" is used to instruct the Excel the sorting order of a list of items.
An example custom list: "JAN", "FEB", "MAR"
should be sorted as "JAN", "FEB", "MAR", but not alphabetically "FEB", "JAN", "MAR"
There are two types of "custom List", one is Excel built-in (including Months,Day of weeks...), another type is user defined.
The "Custom List" could be reviewed or adjusted with following location:
Excel 2010: File->Option->Advanced->Edit Custom Lists (General Section)
Excel 2007: Office button->Excel Options->Popular-> Edit Custom Lists (button)
Excel 2000/XP/2003: Tools->Option->Custom Lists (Tab)
Symptoms
Assume that we feeding a list of 3 alphabet into a pivottable to sort: "AAA","AAB"..."AAZ","ABA"...."ZZZ"
The "sorted" result from Pivottable would become this:
You could see the list is started with "Months" JAN but not AAA
Resolution and Workaround
Excel 2007/2010
A. To switch off the custom list sorting on pivot table
- Right Click the PivotTable-> PivotTable Options
- Totals & Filters-> remove the check box from "Use Custom Lists when sorting"
B. To switch off the individual column custom list ordering
- Right Click the Field required -> Sort->More Sort Option
- In the "Sort Options", Make sure "Ascending" or "Decending" selected.
- Click on the "More Options" Button
- Remove the checkbox: "Sort automatically every time the report is updated"
- Select "No Calculation" in first key sort order
- Press OK twice
C. To switch off the individual column custom list ordering
- Right click the Field required, go to Data Menu->Sort
- Click on Options button, select "normal" in custom sort order
- Press OK twice
applying custom sorting to fields of pivot grid table
ReplyDeleteThanks man it work for me to create sheet for my client Compact suv cars
ReplyDelete