+ Reply to Thread
Results 1 to 2 of 2

Finding the position/range of pivot tables

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,101

    Finding the position/range of pivot tables

    To all experts of MS Excel & VBA Excel,

    I've been trying to write a code that could help me find the position/range/cell of the pivot table.

    A little explanation, I make multiple pivot tables in a worksheet called "Pivot". These pivot tables are found on cell A5 (1st pivot), A36 (2nd pivot), A67 (3rd pivot) and A98 (4th pivot).

    I know how to write the codes that shows me how many pivot tables are there in "Pivot" worksheets, but I couldn't be able to write in which position/range/cell are these pivot tables at.

    The reason why I wanted to do this is that, I want to make the pivot tables in order, i.e. 3 rows after the pivot 1, is a new pivot, which is pivot 2, and so on. Also, with this in mind, I could refresh which pivot tables I want instead of doing a refresh all, which is what i have the code doing right now.

    Thank you in advanced to those who're helping me out.
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,228

    Re: Finding the position/range of pivot tables

    Hi,

    It looks like you need the VBA equivalent of Ctrl-Down arrow. If I select the cell A7 on your BEFORE pivot and do a Ctrl-Down Arrow I can find the bottom of the first pivot. The VBA for that is this:

    Please Login or Register  to view this content.
    So you want to do some VBA to put your second Pivot Table at Cells(BottomRow + 5, "A")

    To find the bottom of the second Pivot Table you would need to do a
    Please Login or Register  to view this content.
    And then continue...

    I hope this helps..
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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