+ Reply to Thread
Results 1 to 7 of 7

get name of data field that is used in value filter of my pivot field

  1. #1
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    get name of data field that is used in value filter of my pivot field

    Hi all,

    I use a value filter for my pivot field "MATERIAL". How can I get the name of the data field that is used in that filter?

    Please Login or Register  to view this content.
    doesn't work

    Please Login or Register  to view this content.
    works, but only if I know the index of the filter within the pivot table....

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: get name of data field that is used in value filter of my pivot field

    You could use:

    Please Login or Register  to view this content.
    Rory

  3. #3
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: get name of data field that is used in value filter of my pivot field

    Works! But what if my pivot field has a label AND a value filter. Is there no syntax for just value filters?

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: get name of data field that is used in value filter of my pivot field

    I don't know offhand - you can't do that in 2010 which is all I have in front of me.

  5. #5
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: get name of data field that is used in value filter of my pivot field

    Ok. Is there a way to check if the pivot field HAS a filter first? Otherwise it will throw an error if I use

    Please Login or Register  to view this content.
    and it has none...

  6. #6
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: get name of data field that is used in value filter of my pivot field

    Check the PivotFilters.Count is greater than 0

  7. #7
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: get name of data field that is used in value filter of my pivot field

    ups, sorry! I wrongly remembered that this only works for the whole pivot table not a specific pivot field! Thanks!!

+ 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. Replies: 0
    Last Post: 08-15-2016, 02:07 PM
  2. VBA Using Combo to change Pivot Filter problems if data not in field
    By Laial in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-09-2014, 11:06 AM
  3. Replies: 0
    Last Post: 06-26-2012, 09:06 PM
  4. Replies: 3
    Last Post: 03-03-2012, 12:16 PM
  5. Replies: 0
    Last Post: 07-21-2010, 01:43 PM
  6. Pivot table filter data field to show items with count more than n
    By kuraitori in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-22-2010, 07:36 PM
  7. Pivot Table VBA - Data Field - Original (source) field name
    By hbgpausa0 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2008, 10:25 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