+ Reply to Thread
Results 1 to 5 of 5

VBA to reposition pivot table performs incorrect task

  1. #1
    Registered User
    Join Date
    08-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    39

    VBA to reposition pivot table performs incorrect task

    Hello,

    I've written some code here to reposition one of two pivot tables on a page:

    When the code is running the variable "LastRow_PT1" has a valid value.. but when this code executes it moves the second pivot table to another sheet..

    Please Login or Register  to view this content.
    Thank you for your help!

    Adam

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,936

    Re: VBA to reposition pivot table performs incorrect task

    To keep it on the same sheet, use the same sheet in the location

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    08-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: VBA to reposition pivot table performs incorrect task

    The variable LastRow_PT1 is adjusted earlier in the code.. With the additional offset it still moves the second pivot to another tab..

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,936

    Re: VBA to reposition pivot table performs incorrect task

    Oops - sorry, forgot that location takes a string:

    Please Login or Register  to view this content.
    Last edited by Bernie Deitrick; 07-16-2015 at 05:03 PM.

  5. #5
    Registered User
    Join Date
    08-30-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: VBA to reposition pivot table performs incorrect task

    Fantastic Bernie. Thank you!

    Adam

+ 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. [SOLVED] Pivot Table that performs a distinct count in excel 2013
    By tdf2437 in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 09-09-2014, 09:03 AM
  2. [SOLVED] Incorrect data in Pivot table
    By Reedberg in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 02-16-2013, 09:55 AM
  3. Pivot table sum value incorrect
    By bird is da word in forum Excel General
    Replies: 4
    Last Post: 01-28-2012, 02:27 PM
  4. Pivot table row total INCORRECT
    By Excel Novice805 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-29-2010, 12:11 PM
  5. how to reposition a data table in chart
    By JohnBonjer in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-06-2006, 07:15 AM
  6. [SOLVED] Incorrect totals in Pivot Table
    By Jake in forum Excel General
    Replies: 1
    Last Post: 01-11-2006, 07:10 PM
  7. [SOLVED] Pivot Table through Scheduled Task
    By [email protected] in forum Excel General
    Replies: 1
    Last Post: 10-18-2005, 05:05 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