+ Reply to Thread
Results 1 to 3 of 3

Formattting the date in a Pivot Chart

  1. #1
    Registered User
    Join Date
    04-28-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2003
    Posts
    24

    Question Formattting the date in a Pivot Chart

    Hi There

    Appreciate any help with this.

    I have a pivot chart with the following date format:
    6/11/2011

    Now I want to change it into the following date format:
    6/11/2011 0:00

    To do this I get the following Macro after recording it

    Please Login or Register  to view this content.

    But if I run this Macro(Macro4) it changes the PivotField “Time” to “d/mm/yyyy h:mm “, which is not what I want.

    Can anyone please help me correct this?? See attached.




    Building from this I have multiple sheets with Pivot Charts with the date format:

    6/11/2011

    I have created the following Macro that will go through every Pivot Chart in every Pivot Sheet and hopefully change it to the format I want:
    6/11/2011 0:00

    The Macro is below, but it is not doing what I want it to do. As I have copied the line from the recorded macro above.

    Please Login or Register  to view this content.

    So I think if I get this line of code right I will be all set.

    Please Login or Register  to view this content.
    Thanks

  2. #2
    Valued Forum Contributor Miraun's Avatar
    Join Date
    04-03-2009
    Location
    New England
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    554

    Re: Formattting the date in a Pivot Chart

    SO CLOSE!

    Please Login or Register  to view this content.
    Going for Guru! Click the Star to the bottom left of this post if I helped!

  3. #3
    Registered User
    Join Date
    04-28-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Formattting the date in a Pivot Chart

    Hey Miraun

    Thanks for that. Just trying to understand why the macro did not record it the way you wrote it?

    Also, is there a good place to find the various properties options available to this object(e.g. Pivot Field.NumberFormat)?? I mean should I be able to find this somewhere or does this come with experience?

    Thanks Again
    Last edited by hattrick_123a; 11-16-2011 at 04:10 PM. Reason: correction

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