+ Reply to Thread
Results 1 to 2 of 2

VBA to change pivot table filter

  1. #1
    Registered User
    Join Date
    08-16-2013
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    16

    VBA to change pivot table filter

    Hello

    I am new to this forum and very new to VBA as well so please be kind

    I have a combo box populated with a list of clients. when a client is selected from this list i need a pivot table (on a separate tab called PivotTrade) to change the filter to that client name. how can i do this using macros?

    Thanks
    Nikita

  2. #2
    Registered User
    Join Date
    08-16-2013
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    16

    Re: VBA to change pivot table filter

    Ok, i've managed to figure this out a little bit. I'm now able to select a client name on the Dashboard tab using a combo list. Once that changes I get the value in cell B7 of the same page. I'm then trying to use this value to have the pivot table on the PivotTrade page update. The below query does appear to work but the only issue is that I have to manually run the code each time for the pivot table to update. Please help! thanks

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$B$7" Then
    Call macro1
    End If
    End Sub

    Sub macro1()
    Sheets("PivotTrade").Range("B4") = Sheets("Dashboard").Range("B7").Value
    End Sub

+ 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. VBA Macro to change filter on a pivot table
    By BobbyH in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-16-2013, 03:40 AM
  2. Pivot Table Auto filter Change
    By tris1948 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-17-2013, 06:51 AM
  3. 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
  4. 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
  5. Userform to change Pivot Table filter
    By MGT2000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-04-2009, 12:02 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