+ Reply to Thread
Results 1 to 3 of 3

Thread: Problem sorting names in pivot table

  1. #1
    Registered User
    Join Date
    01-03-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    2

    Problem sorting names in pivot table

    I have created a pivot table using a family name in row labels. The names appear in alphabetical order unless the person's name is the same as a month or day of the week. The result is that I have Mr Sun and Mr May at the top of my list, rather than listed alphabetically. Sorting the list does not solve the problem. It switches Mr Sun and Mr May, but does not included them in the main list. Is there a setting I can use that will stop Excel 2007 thinking that these words are something that they are not?

  2. #2
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,150

    Re: Problem sorting names in pivot table

    Hello,

    can you post a small data sample and the pivot table that shows that behaviour? It's kinda hard to picture why a text field should be sorted as a month or day.

    cheers,

  3. #3
    Registered User
    Join Date
    01-03-2012
    Location
    Melbourne
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Problem sorting names in pivot table

    Hi Teylyn,

    For some reason, I'm unable to "reply with quote".

    Attached is an example of the problem. I have anonymised the given names. There are three people with the family name of "Sun" and one with "May". I also tried using "June" and that also appeared at the top of the list. I have also tried formating the source entries as text, but it doesn't make any difference.

    Cheers,
    John
    Attached Files Attached Files
    Last edited by jmhassett; 01-04-2012 at 06:27 PM. Reason: typo

  4. #4
    Forum Guru
    Join Date
    10-28-2008
    Location
    Not here anymore
    MS-Off Ver
    irrelevant
    Posts
    10,150

    Re: Problem sorting names in pivot table

    For some reason, I'm unable to "reply with quote".
    Good. Why would you want to quote, anyway. You're responding directly to the previous post.

    Excel recognises the words Sun or May as elements of the custom lists for weekdays and months. Therefore they will be sorted before any other text. As far as I'm concerned, this comes very close to a bug. There are two possible workarounds that I see:

    1. Set the field sorting to manual and drag the rogue names into their correct places. They will stay in that order when the pivot table is refreshed. In my tests, the manual sort order was adhered to even after I deleted Sun and May from the source, refreshed the pivot, added Sun and May to the source and refreshed the pivot again.
    So, this is a one-time manual effort.

    2. Delete the custom lists for the weekdays and the months. This is probably not advisable, as it would prevent the proper sorting of days and months in other aspects of Excel.

    cheers,

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0