+ Reply to Thread
Results 1 to 3 of 3

Refresh All Does Not Collapse Pivot Table

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    440

    Refresh All Does Not Collapse Pivot Table

    Hi,

    I have a pivot table with pivot chart, and I use VBA to reinsert new data into the table as I want to bypass the need to enter the password everytime it pulls data from the Access tables.
    After the new data has been added to the table, I use the following code to refresh the Pivot Table:
    Please Login or Register  to view this content.
    When I do it for on a new day, the pivot table does not automatically Collapse the Date, so it creates an ugly double date name in the Chart.

    Is there a way to force Collapse after refresh?

    See screenshot for before and after:
    Attached Images Attached Images

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Refresh All Does Not Collapse Pivot Table

    Hello,

    if you don't want to expand the months, have you considered removing the fields that are nested underneath the date? If you don't nest anything, there's nothing to expand or collapse in the first place.

    Maybe you can post a small data sample with the setup for inspection.

    cheers, teylyn

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Refresh All Does Not Collapse Pivot Table

    Hi,

    You might perhaps loop through the rowfields thus
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

+ 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. Multiple Collapse/Expand - Pivot Table Field List
    By pattyjay in forum Excel General
    Replies: 2
    Last Post: 09-17-2015, 04:37 PM
  2. Collapse pivot table by number before the decimal point
    By tomca in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 09-09-2015, 05:10 AM
  3. Expand/collapse only one item in Pivot table
    By wacker in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-01-2015, 12:10 AM
  4. Use slicer to expand / collapse pivot table
    By IronCladRooster in forum Excel General
    Replies: 1
    Last Post: 02-24-2015, 10:54 AM
  5. [SOLVED] Using VBA to change a pivot table filter, refresh the report and set up a refresh delay
    By Bonnister in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-18-2012, 10:43 AM
  6. Collapse/Expand - Pivot table Fields - Need equivalent option in Excel VBA Pivot table
    By ragavendraph in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2012, 03:00 PM
  7. collapse pivot table field list by default
    By tlafferty in forum Excel General
    Replies: 3
    Last Post: 12-02-2011, 06:39 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