+ Reply to Thread
Results 1 to 2 of 2

Macro to sort out a pivot table

  1. #1
    Registered User
    Join Date
    05-01-2014
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    2

    Unhappy Macro to sort out a pivot table

    Hello All
    I have been searching for a macro that will sort out a Pivot Tables in a protected sheet. So far have found a macro (link below) but as you can see it will work with all sheets in a workbook rather then just one.
    The data for the Pivot Table is held in a hidden sheet.
    I am using Excel 2003 and when I update the data the new item appears at the end of the existing data in the Pivot Table, instead of being listed alphabetically. I was hoping (with someones kind assistance) to run a macro if possible within the following worksheet change (the unhide macro that I use on the data sheet will unprotect the pivot (protected) sheet).

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    'If data on this worksheet changes, refresh the pivot tables

    Worksheets("Collection").PivotTables("PivotTable1").PivotCache.Refresh
    Worksheets("Collection").PivotTables("PivotTable2").PivotCache.Refresh

    End Sub

    http://www.contextures.com/xlPivot05.html

    Any help is appreciated.

    Thanks

  2. #2
    Registered User
    Join Date
    05-01-2014
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    2

    Talking Re: Macro to sort out a pivot table

    Please ignore solution found

+ 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. Sort table with only formulas...and not pivot table
    By agweyre in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-31-2012, 09:19 PM
  2. macro to create pivot table(s) and sort out data in other worksheet
    By Astrid in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 12-22-2010, 05:55 PM
  3. Replies: 2
    Last Post: 05-19-2010, 05:14 AM
  4. Sort pivot table
    By jbormann in forum Excel General
    Replies: 2
    Last Post: 07-18-2006, 03:35 PM
  5. Replies: 11
    Last Post: 09-19-2005, 07:05 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