+ Reply to Thread
Results 1 to 4 of 4

Printing one filtered result at a time with pivot tables

  1. #1
    Registered User
    Join Date
    05-20-2015
    Location
    Stockholm, Sweden
    MS-Off Ver
    2010
    Posts
    2

    Printing one filtered result at a time with pivot tables

    Hi!

    I'm trying to find a solution to make a macro that prints all the data from every individual name in the pivot filter.
    Since the names can differ from one day to another I want the macro to go through them all, filter one at a time and print them one at a time until there is no names left.

    IF I record a macro it will ofcourse only print the given names and this is a huge problem since the names can change from day to day.

    So any suggestions of how I can make a macro that will go through the filtered-list and print them all individually with a vba code?

    Example of my macro so far:
    Please Login or Register  to view this content.
    Regards.
    Leouw

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: Printing one filtered result at a time with pivot tables

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    05-20-2015
    Location
    Stockholm, Sweden
    MS-Off Ver
    2010
    Posts
    2

    Re: Printing one filtered result at a time with pivot tables

    Quote Originally Posted by protonLeah View Post
    Please Login or Register  to view this content.
    This code leaves me with a Run-time error '1004':
    Application-defined or object-defined error

    If I debug it shows this line to be the problem:

    ActiveSheet.PivotTables("PivotTable9").PivotFields("Name").CurrentPage = person

    The actual code I use right now:
    Please Login or Register  to view this content.

    I want the macro to go through this list and print everyone individually, since the excel page information changes when they are filtered. (I had to blur the last names due to policy).

    /Alex
    Attached Images Attached Images
    Last edited by Leouw; 06-25-2015 at 02:38 AM. Reason: Attached a picture and my current code

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,613

    Re: Printing one filtered result at a time with pivot tables

    Try replacing "Name" with the actual column header

+ 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. Printing Pivot Tables
    By Pony08 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2014, 05:23 PM
  2. Pivot tables: display filtered data in another worksheet
    By ridingbio in forum Excel General
    Replies: 5
    Last Post: 12-12-2011, 12:22 AM
  3. [SOLVED] Printing a filtered range one at a time
    By andyb63uk in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-30-2011, 01:59 PM
  4. Pivot Tables - Listing Filtered Labels
    By learning_vba in forum Excel General
    Replies: 0
    Last Post: 06-13-2011, 03:50 PM
  5. Replies: 0
    Last Post: 02-26-2009, 12:10 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