+ Reply to Thread
Results 1 to 2 of 2

writing a macro to move data from a pivot table to individual workbooks sorting by filter

  1. #1
    Registered User
    Join Date
    09-05-2016
    Location
    Hoboken
    MS-Off Ver
    MAC
    Posts
    1

    writing a macro to move data from a pivot table to individual workbooks sorting by filter

    I have a pivot table which is filtered based on the names of salespeople. Each week, they provide data on their weekly activities and the pivot table is updated. I want to give back to each individual agent a copy of their activities in a separate workbook.

    I want to write a macro for each agent workbook that would go to the workbook with the pivot table and change the filter corresponding to the name of the agent for that particular individual agent spreadsheet. I would repeat this for each salesperson.

    I tired to use the macro recorder. It worked when I could filter the names manually but the recorder did not record correctly ie which agent/salesperson the macro was suppose to sort on.

    I have a feeling this is one of those that cannot be done using the macro recorder but has to be written in Visual Basic.

    Any suggestions?

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: writing a macro to move data from a pivot table to individual workbooks sorting by fil

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

+ 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. Why my Pivot Table Filter shows individual dates
    By chico.corrales in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 03-28-2016, 05:52 AM
  2. macro to move rows of data into individual sheets
    By sophia_1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-16-2014, 10:55 AM
  3. [SOLVED] Pivot Table Report Filter Sorting
    By mcmuney in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-06-2013, 04:17 AM
  4. [SOLVED] help with writing a macro for sorting a table
    By jyl7 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-24-2013, 03:54 PM
  5. Pivot table- sorting with value filter problem
    By Masun in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-02-2013, 03:55 AM
  6. [SOLVED] Writing a Macro for combining individual workbooks into one.
    By DotWFM in forum Excel Programming / VBA / Macros
    Replies: 36
    Last Post: 12-17-2012, 02:53 PM
  7. Move selection specific to individual workbooks
    By Sph01 in forum Excel General
    Replies: 1
    Last Post: 07-13-2012, 06:52 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