+ Reply to Thread
Results 1 to 5 of 5

URGENT.. Recorded Pivot Table Macro error

  1. #1
    Registered User
    Join Date
    02-11-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    71

    Exclamation URGENT.. Recorded Pivot Table Macro error

    Hi Guys....

    I recorded a pivot table to run reports. However, I get an error.

    See attached
    Attached Files Attached Files
    Last edited by nawGo; 04-15-2014 at 11:14 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: URGENT.. Recorded Pivot Table Macro error

    Hi,

    The easiest way to make it flexible is to use a dynamic range name which automatically adjusts to your data range and use the name as the PT source range. Then with the PT sheet activate event just write a line of code to refresh the PT cache.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    02-11-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    71

    Re: URGENT.. Recorded Pivot Table Macro error

    Thanks Richard.
    Last edited by nawGo; 04-14-2014 at 12:07 PM.

  4. #4
    Registered User
    Join Date
    02-11-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    71

    Re: URGENT.. Recorded Pivot Table Macro error

    So basically the table is constant except for column D .
    I recorded the macro to create a pivot table (I recorded using dynamic range and it didn't work).

    My requirement is that sometimes I have to delete the Insider information completely from the this tab but I would still like the macro to run and not give me a run time error:

    Please Login or Register  to view this content.

    How do I make this macro flexible? so that it can even run when I delete the insider rows?


    Attached is a sample
    Attached Files Attached Files
    Last edited by nawGo; 04-15-2014 at 11:15 AM.

  5. #5
    Registered User
    Join Date
    02-11-2014
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    71

    Re: URGENT.. Recorded Pivot Table Macro error

    Okay.. I found the solution here:

    http://www.contextures.com/xlPivot04.html#Clear2002

+ 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. Editing a recorded macro of a csv import error
    By jcmc2112 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-14-2014, 09:24 AM
  2. Recorded macro gets formula error
    By CityMPLSEmpolyee in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-10-2012, 09:28 AM
  3. recorded macro for pagesetup producing error
    By suprme32excel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-27-2009, 05:51 PM
  4. Error in a simple recorded Macro
    By modytrane in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-10-2008, 11:23 AM
  5. Excel VBA error-recorded a macro to sort
    By Leena in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-13-2005, 11:06 AM

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