+ Reply to Thread
Results 1 to 2 of 2

Pivot Field VBA Question

  1. #1
    Registered User
    Join Date
    08-09-2008
    Location
    los angeles
    Posts
    3

    Pivot Field VBA Question

    I'm sure there is a very simple solution to this. I'm trying to use user input to limit field visibility in a pivot table.

    Say I want "Asia" which is written in cell(1,1) to be removed from calculation when it occupies cell(1,1) I have written my code as follows.

    Sheets("PivotSheet").Select
    With ActiveSheet.PivotTables("BudgetPivot").PivotFields("DIVISION")
    .PivotItems(Cells(1, 1)).Visible = False

    I get an error that Excel is unable to locate the Pivot Field even though it reads the cell(1,1) reference as being "Asia"

    Solution?

  2. #2
    Valued Forum Contributor
    Join Date
    08-26-2006
    Location
    -
    MS-Off Ver
    2010
    Posts
    388
    This is one way, walking through the PivotItems Collection of the DIVISION field:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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