+ Reply to Thread
Results 1 to 2 of 2

Use Cell Reference for Pivot table Filter

  1. #1
    Forum Contributor
    Join Date
    01-19-2013
    Location
    Las Vegas, NV
    MS-Off Ver
    Office 365 2016
    Posts
    214

    Use Cell Reference for Pivot table Filter

    lo all,

    I had previously bookmarked some VBA for this, but I can't seem to get it to work in this instance. Can someone show me what I'm doing wrong?

    The cell I set to the "MrktrFieldName" is the cell I'd like to identify in the VBA to filter the "Job Rep" field of the IncomePivot.

    Please Login or Register  to view this content.
    Thank ya much

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Use Cell Reference for Pivot table Filter

    Quote Originally Posted by Miskondukt View Post
    "can't seem to get it to work"
    This is hardly descriptive of the problem. If it errors, what line is highlighted in the debugger and what is the error description?

    cell I set to the "MrktrFieldName"
    Where do you do you set that cell. If "MrktrFieldName" is a named range, then use this syntax to reference it.
    Range("MrktrNameField")

    I think you would call your UpdatePivotFieldFromRange procedure like this...
    UpdatePivotFieldFromRange "MrktrNameField", "Job Rep", "IncomePivot"
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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 - Filter a Pivot Table field using "contains" keyword from cell reference?
    By andya in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2016, 08:26 AM
  2. vba to filter row labels in pivot table based on cell reference
    By Stew1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2015, 10:30 AM
  3. Replies: 6
    Last Post: 07-31-2014, 12:56 PM
  4. MACRO - Pivot filter based on cell reference
    By maikoz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-24-2014, 04:02 AM
  5. 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
  6. 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
  7. Filter Table By Cell Reference
    By thegooser123 in forum Excel General
    Replies: 5
    Last Post: 09-03-2010, 07:59 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