+ Reply to Thread
Results 1 to 3 of 3

Changing Data source of a pivot table

  1. #1
    Registered User
    Join Date
    05-31-2012
    Location
    Gurgaon
    MS-Off Ver
    Excel 2003
    Posts
    1

    Changing Data source of a pivot table

    Hi All,

    My VBA programming skills are limited . I must automate this report which contains a pivot table . the data source of the pivot table is a database on the adjacent sheet. The problem is that the number of columns in the data source may change .Now i must refresh the pivot table to reflect this change in columns .Is it possible using VBA programming. If yes, then please help me with this as i have tried recording a macro but it fails

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Changing Data source of a pivot table

    HI RamGopal,

    Welcome to the forum.

    You just need a dynamic name as a source for pivot table... upload a sample workbook and I can show you how this can be done, else search internet to learn about dynamic name. best of luck. thanks.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    11-05-2008
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    67

    Re: Changing Data source of a pivot table

    When I needed to do this I went to Contextures and used Robert Goviers example here

    If you need more help post up your example sheet and we can assist

    Cheers

    Iain

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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