+ Reply to Thread
Results 1 to 3 of 3

Pivot table based on named (non-contiguous) range

  1. #1
    Forum Contributor
    Join Date
    10-17-2008
    Location
    Vancouver
    MS-Off Ver
    2002 and XP
    Posts
    117

    Pivot table based on named (non-contiguous) range

    Hello All,

    have Sheet("List") with an autofilter and sheet("Table") with pivot table. How do I base the pivottable on the filtered (visible) items from "List"?

    I use this code so far but:

    Please Login or Register  to view this content.
    Code breaks on the pivot table is refreshed with "Reference not Valid"

    so I check the name, and the Refers to field is filled up with this
    Please Login or Register  to view this content.
    How do I construct a proper range reference based on the visual cells?
    Last edited by kuraitori; 08-16-2010 at 04:57 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Pivot table based on named (non-contiguous) range

    You need a contiguous range as source.

    Can you not replicate the visibility via a Page Field ?
    eg store a SUBTOTAL function on each row on source sheet designed to generate 1/0 pending row visibility - use this new column as a Page Field on your Pivot set to 1 thereby excluding all hidden rows from subsequent analysis.

    If not you will need to take the visible range and move to a contiguous range elsewhere before setting as source for PT.

  3. #3
    Forum Contributor
    Join Date
    10-17-2008
    Location
    Vancouver
    MS-Off Ver
    2002 and XP
    Posts
    117

    Re: Pivot table based on named (non-contiguous) range

    omg.....that is an awesome idea

    sorry, my setup is a lot of data and end-users use autofilters to select the data subset (like only BC sales)

    and the old method I used was coping all visible cells to a hidden worksheet and naming that as the source range. Prob was file size.

    Thanks for the awesome workaround.

+ 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