+ Reply to Thread
Results 1 to 4 of 4

macro for pivot table

  1. #1
    Registered User
    Join Date
    02-18-2014
    Location
    Stockholm
    MS-Off Ver
    Excel 2010
    Posts
    13

    macro for pivot table

    Dear Excelers,

    Perhaps someone is willing to help solve my work task by writing a suitable macro!
    I would like to automatically change the filter and show data before a date in a few pivot tables.
    I have looked up how to do this with coding, but think it is quite a bit above my understanding.

    Essentially it should be a looping macro so that after all the actions for row 3 are complete, that it starts with row 4, then row 5, etc.
    There will be a lot of data so untill the macro hits an empty cell.

    step 1. all the pivot tables to be in Z->A order so that the latest dates are on top
    step 2. the date in A3 to become the date in all the pivot tables before which all data is shown
    step 3. the content of B3 to be in sheet2B1 and also sheet2N1
    step 4. the content of C3 to be in sheet2H2 and also sheet2N2
    step 5. the values from sheet 4 (which are based on the pivot tables) to be placed in the corresponding rows in sheet 3, so D3:F3 and then D4:F4
    then repeat for the next row

    perhaps there should be a refresh of the Pivot table somewhere? I don't know if that is necessary. Attachment 323849
    Attached Files Attached Files
    Last edited by JBeaucaire; 06-08-2014 at 01:21 PM. Reason: Moved to correct forum, closed duplicate thread. Please read the Forum Rules you agreed to follow, link above in menu bar.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: macro for pivot table

    See if the sheet gives you the result you want.

    I made this with several macro's.

    Run this macro Sub CONVERTROWSTOCOL_Oeldere_revisted()




    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    02-18-2014
    Location
    Stockholm
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: macro for pivot table

    Thank you very much for putting in the effort and time to try and solve this!

    However, it is not quite what I want.
    The values you copy back are a date, and two other numbers but they are not the values from sheet 4 that I would have liked.

    Rather than a new sheet called output, I would like the output back in sheet 3 next to the corresponding row if that is possible..

    Let me know if you can still help, and if you need anymore information on what I would like to do.

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: macro for pivot table

    In that case maybe someone else?

+ 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. Macro to Copy Pivot Table and Paste a Regular Data Table in the Same Position
    By webfeet2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2013, 06:34 AM
  2. Macro Help Needed - Link Pivot Table Filter to Regular Table AutoFilter
    By ycx1129 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2011, 12:54 PM
  3. Macro to create pivot table/pivot chart
    By Karina in forum Excel General
    Replies: 2
    Last Post: 10-27-2011, 10:33 PM
  4. Macro to build pivot table based on another pivot table
    By tcowen61 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-31-2009, 10:41 AM
  5. Macro Pivot Table vs Manual Pivot Table - different results
    By vodka in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-03-2008, 04:43 PM

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