+ Reply to Thread
Results 1 to 3 of 3

Changing Name Of Pivot Table

  1. #1
    Registered User
    Join Date
    04-04-2009
    Location
    N/A
    MS-Off Ver
    Excel 2003
    Posts
    24

    Changing Name Of Pivot Table

    I seem to have a small problem with a Pivot Table on a file that we get weekly. I've built a macro to run across the file to format it and refresh. The problem is, sometimes it fails because the Pivot Table is listed as "PivotTable1" and sometimes it comes through as "PivotTable2". I'd like to amend it so that regardless of it's name, it can be renamed to "MainPivot" or something similar.

    All I can get upto so far is:

    Please Login or Register  to view this content.
    Is there anyway to amend the macro to select the pivot (there's only one on the sheet) regardless of what it's initially called?

    Thanks!
    Last edited by McNulty; 05-08-2009 at 06:29 PM.

  2. #2
    Forum Contributor
    Join Date
    04-01-2009
    Location
    Irvine, CA
    MS-Off Ver
    Excel 2010
    Posts
    280

    Re: Changing Name Of Pivot Table

    You could use the ordinal instead of the name...
    Please Login or Register  to view this content.
    Actually, as long as there is only one, you could just use PivotTable(1) in your macro and then it doesn't matter what it is called.

  3. #3
    Registered User
    Join Date
    04-04-2009
    Location
    N/A
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Changing Name Of Pivot Table

    Fantastic - many 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