+ Reply to Thread
Results 1 to 5 of 5

Change filter pivot table

  1. #1
    Registered User
    Join Date
    03-21-2017
    Location
    Jakarta, DKI
    MS-Off Ver
    2013
    Posts
    3

    Question Change filter pivot table

    Hello, need help for change filter pivot table on selected pivot table,
    i have code from my friend and i think it can be simplified Thanks before

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,143

    Re: Change filter pivot table

    Welcom to the forum,
    You have 5 identical blocks of code, differing only in the number in "PivotTableXX", where "XX" is the number. So you can use a loop with a changing counter, which is the numbering source for "PivotTableXX", e.g.:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-21-2017
    Location
    Jakarta, DKI
    MS-Off Ver
    2013
    Posts
    3

    Re: Change filter pivot table

    Quote Originally Posted by porucha vevrku View Post
    Welcom to the forum,
    You have 5 identical blocks of code, differing only in the number in "PivotTableXX", where "XX" is the number. So you can use a loop with a changing counter, which is the numbering source for "PivotTableXX", e.g.:
    Please Login or Register  to view this content.
    niceee awesome!, thanks a lot friend. you make this script very simple and run fastly.
    what if the pivotTable is on a different sheet. and the number of pivot tables is not sequential?
    Last edited by fiqarcobel; 05-05-2019 at 11:53 AM.

  4. #4
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,143

    Re: Change filter pivot table

    Ad 1.
    Quote Originally Posted by fiqarcobel View Post
    ... what if the pivotTable is on a different sheet ...
    If you want to have more flexibility with the name of the sheet changing, its name should be passed to the code by a constant or variable that stores that name, for example:
    Please Login or Register  to view this content.
    Ad 2.
    Quote Originally Posted by fiqarcobel View Post
    ... and the number of pivot tables is not sequential ...
    Question too inaccurate, general, of the kind of these, I quote: "what needs to be done to make it right ?" or "What should we do to make us feel good ?".
    The answer can also be general: "You have to do a lot".

    It would be necessary to first determine what kind of discontinuity is there and if is there any repeatability, some kind of scheme or not ?
    Give examples ...

  5. #5
    Registered User
    Join Date
    03-21-2017
    Location
    Jakarta, DKI
    MS-Off Ver
    2013
    Posts
    3

    Re: Change filter pivot table

    Quote Originally Posted by porucha vevrku View Post
    Ad 1.

    If you want to have more flexibility with the name of the sheet changing, its name should be passed to the code by a constant or variable that stores that name, for example:
    Please Login or Register  to view this content.
    Ad 2.

    Question too inaccurate, general, of the kind of these, I quote: "what needs to be done to make it right ?" or "What should we do to make us feel good ?".
    The answer can also be general: "You have to do a lot".

    It would be necessary to first determine what kind of discontinuity is there and if is there any repeatability, some kind of scheme or not ?
    Give examples ...
    Thankyouu for your help, i improve your script for pivot table from another sheet, now my tools run fastly than before

+ 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. Change Chart Pivot series Colour depending from Pivot Table Filter value
    By BrianAll in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-30-2018, 02:20 PM
  2. Change on Pivot Table Filter
    By BrianAll in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2017, 02:10 PM
  3. Change Pivot Table Filter from Value in a Cell
    By andyboles in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2016, 02:05 PM
  4. Replies: 6
    Last Post: 07-31-2014, 12:56 PM
  5. VBA to change pivot table filter
    By Nmarkit in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2013, 09:44 AM
  6. Pivot table, assigning a cell wo be change the Pivot table filter
    By jwongsf in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-28-2012, 05:00 PM
  7. Change Pivot table Filter Based on Cell Value *Multiple Filter items* Possible?
    By Flydd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-27-2012, 06:57 AM

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