+ Reply to Thread
Results 1 to 3 of 3

Macro to create pivot table/pivot chart

  1. #1
    Registered User
    Join Date
    08-12-2011
    Location
    Canada, Edmonton
    MS-Off Ver
    Excel 2003
    Posts
    7

    Macro to create pivot table/pivot chart

    Hello,

    I would like to have a macro that creates a pivot table and/or a pivot chart that show average percentage of expenses for each month so that pivot tables/graphs could be automatically created for data of each department and branch. The example of how a pivot table/chart would look is shown in the attachment.

    I don't think I could just record a macro because the number of rows would be different in each situation, so the range of the initial table would be always different.

    Thank you so much for your help.
    Attached Files Attached Files
    Last edited by Karina; 10-27-2011 at 10:31 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro to create pivot table/pivot chart

    This code should help you out. Its dynamic enough to take as many rows as there are in the "Data" tab. When you want to run this macro, delete the old pivot that you have and run the code. It also gives you a pivot chart.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-12-2011
    Location
    Canada, Edmonton
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Macro to create pivot table/pivot chart

    Thank you very much, Arlu. It works really well.

+ 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