+ Reply to Thread
Results 1 to 3 of 3

Refresh pivot table without updating filter

  1. #1
    Registered User
    Join Date
    04-23-2014
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    2

    Refresh pivot table without updating filter

    Hi,

    I have a macro to refresh all pivottables in my workbook. Each pivottable source from the same data pool - in addition I have a filter on each pivottable. Is there a way to fix this filter, such that once the source data is updated, the filter doesn't change? Or to only refresh the "data" in the pivottable?

    My code for refreshing all pivottables is given below.

    Dim pvt As PivotTable
    Dim sh As Worksheet
    Application.Calculation = xlManual
    For Each sh In Worksheets
    For Each pvt In sh.PivotTables
    pvt.RefreshTable
    Next pvt
    Next sh
    Calculate
    Application.Calculation = xlAutomatic

    Thanks in advance.

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Refresh pivot table without updating filter

    Hi,

    Please check if the following works:

    Dim Sheet as WorkSheet, Pivot as PivotTable
    For Each Sheet in ThisWorkbook.WorkSheets
    For Each Pivot in Sheet.PivotTables
    Pivot.RefreshTable
    Pivot.Update
    Next

  3. #3
    Registered User
    Join Date
    04-23-2014
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Refresh pivot table without updating filter

    Hi,

    Thank you for your input. Unfortunately, it doesn't have the desired effect. The filter changes.

    I have googled around, but I cannot find any things on it.

    \\Lasse

+ 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. [SOLVED] Pivot Table Refresh Keeping Filter Selections Unchaged
    By Aquamore in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-14-2013, 11:51 AM
  2. [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
  3. Pivot Table Auto Refresh after filter has changed
    By pauldaddyadams in forum Excel General
    Replies: 0
    Last Post: 01-27-2012, 11:32 AM
  4. Pivot Table not updating even after refresh :(
    By umermariner in forum Excel General
    Replies: 3
    Last Post: 12-04-2011, 11:31 PM
  5. Pivot Table Filter Refresh Issue
    By Roachman3700 in forum Excel General
    Replies: 0
    Last Post: 11-25-2008, 05:58 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