+ Reply to Thread
Results 1 to 2 of 2

PivotTable keeps adding additional columns on macro run

  1. #1
    Registered User
    Join Date
    08-03-2017
    Location
    wisconsin
    MS-Off Ver
    2013
    Posts
    8

    PivotTable keeps adding additional columns on macro run

    I am struggling with trying to figure out why a simple macro that deletes a data sheet and imports a new data sheet (same amount of columns, but could have new rows) is not having an existing Pivot Table update on those values. (either automatically or by refresh option). The reason it cannot refresh is the DATA SOURCE keeps adding additional columns that do not have any data, i.e. instead of stopping on column R, is will stop on column S, or Y, etc.

    The last part of the macro relies on the auto-update of the Pivot, so the entire project is at a stall, why?????!

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

    Re: PivotTable keeps adding additional columns on macro run

    Hi donvang,

    I think a Dynamic Named Range might help this problem. If you create one that spans the data that you import and then use that DNR name for the source of your Pivot Table, it might solve your problem.

    http://www.contextures.com/xlNames01.html
    www.ozgrid.com/Excel/DynamicRanges.htm
    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)

Similar Threads

  1. Weighted Average, Multiple Criteria, Adding additional columns.
    By JeffN1234 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-19-2016, 11:05 AM
  2. Need help with a Macro - Adding additional function
    By SalientAnimal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-20-2015, 06:35 AM
  3. Macro to format data - counting and adding additional rows on condition
    By rynofrowan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-12-2013, 11:46 PM
  4. [SOLVED] Adding additional selection criteria to existing Macro
    By Mogpot1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-23-2013, 10:29 AM
  5. Pivot Table adding additional columns excel 2007
    By runner in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-28-2012, 12:24 PM
  6. Adding additional columns and values based on the given data
    By nynamyna in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2011, 05:22 PM
  7. PivotTable Field List: Adding Columns
    By michaelweaver4 in forum Excel General
    Replies: 1
    Last Post: 03-15-2011, 10:15 PM

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