+ Reply to Thread
Results 1 to 8 of 8

Pivot Months Over a Year in Incorrect Order

  1. #1
    Registered User
    Join Date
    04-02-2015
    Location
    Seattle,WA
    MS-Off Ver
    MS 2013
    Posts
    4

    Pivot Months Over a Year in Incorrect Order

    Hi,

    My apologies if this question has been asked. I tried searching for it, but I wasn't able to find anything.

    My problem is that when I arrange 6 month's worth of data in a pivot table by month, January, February, and (now March) appear in sequence before the previous year. So for example, a 6 month report up to and including March would have the following month order on the pivot table:

    Jan(15) - Feb(15) - Mar(15) - Oct(14) - Nov(14) - Dec(14)

    I'm wondering how to get this order:

    Oct(14) - Nov(14) - Dec(14) - Jan(15) - Feb(15) - Mar(15)

    Does that make sense?

    Thank you for all your help!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Pivot Months Over a Year in Incorrect Order

    Hi, welcome to the forum

    Im betting that your months are text names, rather than actual dates?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-02-2015
    Location
    Seattle,WA
    MS-Off Ver
    MS 2013
    Posts
    4

    Re: Pivot Months Over a Year in Incorrect Order

    Unfortunately, no. Here is a single data entry: "1/6/2015 3:50:00 AM"

    Once I've created the pivot table with the data, I group the time entries by month.

    I've also tried a text to columns split to separate the date from the time, but that doesn't have any effect.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Pivot Months Over a Year in Incorrect Order

    Quote Originally Posted by PivotPastryChef View Post
    Unfortunately, no. Here is a single data entry: "1/6/2015 3:50:00 AM"
    That does not necessarily mean they are dates/times. Test 1 (a few?) with =isnumber(cell_ref) FALSE indicates text

    Can you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: Pivot Months Over a Year in Incorrect Order

    OK. I re-created your problem.
    right-click on one of years in pivot table, select sort and adcending (now you have descending (as in attached file)
    (screenshot is from nationalized version of Excel, but location of elements is the same
    Attached Images Attached Images
    Attached Files Attached Files
    Best Regards,

    Kaper

  6. #6
    Registered User
    Join Date
    04-02-2015
    Location
    Seattle,WA
    MS-Off Ver
    MS 2013
    Posts
    4

    Re: Pivot Months Over a Year in Incorrect Order

    Here's the file for a sample pivot table. As you can see, the order is a little strange. I know you can sort columns by manually moving them so I can sort them into the order I would like. However, I feel like I've seen a setting that sorts them in the order I'm looking for here.

    Bad Order.xlsx

    Unfortunately, sorting by the month Oldest to Newest or Newest to Oldest, doesn't seem to work. See pics below for results.

    Bad Order.JPG

    Bad Order 2.JPG

  7. #7
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: Pivot Months Over a Year in Incorrect Order

    Oh, yes - you have months only - no year.
    it looked that you have years:
    Jan(15) - Feb(15) - Mar(15) - Oct(14) - Nov(14) - Dec(14)
    Without a year, excel would group for instance data from Jan 14 and Jan 15 just in Jan group and present it first. Then Feb (any year 1980, 2012, 2015), etc.....

    So just add years to grouping by time an here we are.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-02-2015
    Location
    Seattle,WA
    MS-Off Ver
    MS 2013
    Posts
    4

    Re: Pivot Months Over a Year in Incorrect Order

    That's odd.

    I could have sworn I tried that before. Still, I'll take looking silly and receiving an answer over milling around and trying to find it on my own.

    Thank you so much!

    Now to mark the question as resolved and give you a star...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA Insert Current Month, Year and subsequent months/year for 15 months
    By MichiganWilliams in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2014, 03:49 PM
  2. Incorrect sort order on Pivot Table
    By bruiser in forum Excel General
    Replies: 10
    Last Post: 03-14-2014, 11:04 AM
  3. 12 months rolling in pivot different calendar year.
    By rjbautista20 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-22-2012, 05:08 AM
  4. Months out of order on pivot chart
    By SEMMatt in forum Excel General
    Replies: 3
    Last Post: 01-05-2012, 06:59 PM
  5. Months out of order on Pivot Chart
    By AHJuncti in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-02-2007, 05:43 PM

Tags for this Thread

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.6.0 RC 1