+ Reply to Thread
Results 1 to 6 of 6

Looping through in Pivot table Filter fields

  1. #1
    Registered User
    Join Date
    07-05-2016
    Location
    Berlin, Germany
    MS-Off Ver
    2010
    Posts
    3

    Looping through in Pivot table Filter fields

    Hey guys,

    I have a big problem and I hope that you can help me I want to print all of the filter fields (all of the offers) in a pivot table, and print the tables one below another to the same page. Iīm trying with the following code:

    Please Login or Register  to view this content.
    The code rolls down to the last item in the Filter field and prints only that table instead of all of them. Can you help me, please?

    Thank you,

    Best,

    Dani
    Last edited by zsirsaman; 07-06-2016 at 03:54 AM.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Looping through in Pivot table Filter fields

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Looping through in Pivot table Filter fields

    Please Login or Register  to view this content.
    there is no printing (or extracting) being done here?
    did you leave something out?

  4. #4
    Registered User
    Join Date
    07-05-2016
    Location
    Berlin, Germany
    MS-Off Ver
    2010
    Posts
    3

    Re: Looping through in Pivot table Filter fields

    Hey humdingaling!

    Thank you for your quick reply. This is the first time Iīm using VBA to create Pivot tables. When I do it without the loop, the
    Select Code
    PvtTbl1.ManualUpdate = True
    prints the table, simply like this:

    [/CODE]
    Please Login or Register  to view this content.
    [/CODE]

    Which command should I use to print the table?

    Thank you guys,

    Dani
    Last edited by zsirsaman; 07-06-2016 at 05:59 AM.

  5. #5
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Looping through in Pivot table Filter fields

    you print tables the same way you print normal sheets in excel

    heres a modified example of what you could do...printing to pdf in this case

    Please Login or Register  to view this content.
    ^
    this prints makes pi into a pdf into the \print\ subfolder of ThisWorkBook.Path
    if you want the headers to repeat..you look that into pagesetup prior to running the code
    you can shrink to fit on one page also ..this would require extra code

  6. #6
    Registered User
    Join Date
    07-05-2016
    Location
    Berlin, Germany
    MS-Off Ver
    2010
    Posts
    3

    Re: Looping through in Pivot table Filter fields

    Hey, thank you for your reply, I didnīt use the proper terminology. I donīt want them to be printed out, just to be displayed in the same sheet one below another. Right now it generates the pivot table and "rolls down" the filter field to the last entry (in alphabetical order). So instead of displaying all the offers, it shows only the last pivot table. If I donīt include the
    Please Login or Register  to view this content.
    part, then it displays the overall pivot table (for All the offers).

    I hope now itīs clear what I would like to do,

    thank you in advance,

    Best,

    Dani

+ 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. looping through pivot table filter
    By ShaliniGomes in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-25-2014, 12:02 AM
  2. Pivot Table, Looping through Filter
    By noobtime in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2013, 05:53 PM
  3. Pivot Table filter with added fields?
    By rbpd5015 in forum Excel General
    Replies: 3
    Last Post: 08-17-2010, 02:10 PM
  4. Pivot Table - Looping Through Pivot Fields
    By mini12 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-07-2009, 09:49 AM
  5. Looping page fields in pivot table
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2006, 08:50 PM
  6. [SOLVED] Looping page fields in pivot table
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-13-2006, 06:15 PM
  7. [SOLVED] How do I set up filter for page fields in pivot table?
    By Mitsycat in forum Excel General
    Replies: 3
    Last Post: 05-06-2005, 06:06 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