+ Reply to Thread
Results 1 to 2 of 2

Macro to Create Pivot in Multiple Workbooks (Differing range sizes)

  1. #1
    Registered User
    Join Date
    08-12-2014
    Location
    Massachusetts
    MS-Off Ver
    2007
    Posts
    3

    Macro to Create Pivot in Multiple Workbooks (Differing range sizes)

    I created a macro that goes through a workbook and creates a macro based on one of the sheets. I ran this over 100 times, and realized that the first time I recorded it, the macro saved so that it only grabs a certain portion of the data I want (e.g., the first set of data had 300 rows, and the subsequent sets of data might have had 500-700-900 rows..). THerefore, a lot of my data is wrong.

    How do you adjust VBA code to dynamically grab the correct data when creating a pivot table?

    Here is the code:
    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    08-19-2014
    Location
    Pittsburgh, Pennsylvania
    MS-Off Ver
    2010
    Posts
    45

    Re: Macro to Create Pivot in Multiple Workbooks (Differing range sizes)

    Your source data for the pivot table is looking to an absolute range.

    Where you have:
    Please Login or Register  to view this content.
    You will want to Add something like this:
    Please Login or Register  to view this content.
    Last edited by Jamie.Reis; 08-19-2014 at 04:10 PM. Reason: Text Color Error

+ 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. How can I create a macro for extracting data from multiple workbooks within a folder
    By surfing69 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2013, 11:36 AM
  2. [SOLVED] Record a Macro to create a Pivot Table (Different Sizes)
    By 00pumpkin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-20-2013, 08:48 AM
  3. Replies: 0
    Last Post: 07-25-2013, 05:24 PM
  4. [SOLVED] moving average with differing bin sizes
    By mchapman47 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-03-2013, 04:13 PM
  5. Replies: 2
    Last Post: 06-06-2005, 02:05 PM

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