+ Reply to Thread
Results 1 to 3 of 3

How to get pivot cell source range?

  1. #1
    Registered User
    Join Date
    11-08-2006
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    37

    Question How to get pivot cell source range?

    If I double click on a data cell in a pivot a sheet is created with the relevant source records (rows). How do I programmatically establish the source range from the pivotcell object? I have monkeyed with all sorts of things to no avail. Hopefully there is a simple solution.

    Regards, AB

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    There seems to be lots of pivot objects in the reference documentation, and also lots of methods to go with them. Not sure if what you are looking for is there. I once set up a sheet with a pivot that extracted rows when you double clicked on a datapoint. I made sure the first column of the underlying table had a unique reference line number, and then I used the find function to go to identify that line in the underlying table. Not sure if that helps or not.

    Matt

  3. #3
    Registered User
    Join Date
    11-08-2006
    Location
    Sydney
    MS-Off Ver
    2010
    Posts
    37
    I can write code to find the referenced rows associated with a data point using a key field in the pivot. However, I was hoping that there would be a method that would return the row range(s) so I could avoid having to do this. Excel appears to "know" where the referenced rows are since it responds instantly to double click on a data cell. I have not been able to find a way of accessing this knowledge other than writing my own code.

    Regards, AB

+ 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