+ Reply to Thread
Results 1 to 5 of 5

Pivot filter send sale rep wise data

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    Pivot filter send sale rep wise data

    I have an excel spreadsheet that contains about twenty tabs and each tab contains one or two pivot tables that represent the sales data for an individual sales rep. I also have a macro that sends each tab (pivot table containing sales data) to the correct sales person.

    The problem that I have is with the security of the pivot tables and the separate excel sheet that contains the data (the entire teams sales). To prevent a sales person from seeing other peoples sales, I have created a macro to disable all of the features of a pivot table with the exception of the drill down feature (a feature that I need to have). I then password protected this macro. However, if a sales rep is able to get a program to guess my vba password, they will be able to reverse my macro and reverse my filters to see the data for the entire team.

    I was thinking that a solution to this problem would be to update the macro that sends the email to the individuals. I think I would need to create something that restricts the data that is drillable to only what is filtered on the pivot table. Does anyone know how to create a macro that would allow me to send an email to each sales person, but also restrict the pivot tables to only what is filtered. I do not want the sales people to see others information from sales they are not involved in. If you have any ideas on how I can do this or any other possible solutions, please let me know.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Pivot filter send sale rep wise data

    The approach you should use is to remove the other sheets excpet your data sheet, then use a macro to filter that original data by salesperson, copy only the visible data to a new workbook, create the pivot table(s) in that workbook referencing only the saleperson-specific data, and then send it to the salesperson. No other data will be in the workbook, so there will be no issues with security, or need to disable parts of the pivot table.

    If you need help with that macro, there are a lot of sample macros available that show how to export from a database, based on one or more fields, into a new workbook. Or post back with the specifics you need help with.
    Last edited by Bernie Deitrick; 04-03-2015 at 09:25 AM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Pivot filter send sale rep wise data

    Pls help me with macros.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Pivot filter send sale rep wise data

    This works with the layout that you have - it creates a sub-folder in the folder where you store the file, and all the split out files are put into that folder. Note that your sample pivot table and the data table did not match with the naming convention you used, so I went with the data table names so that the macro would work.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-04-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Pivot filter send sale rep wise data

    It is workings well. Thank you

+ 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. Filter data datewise and columns wise
    By forquaidian in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-09-2014, 08:33 AM
  2. Excel code to represent data from row wise to column wise
    By sreejeshc in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-12-2013, 03:45 AM
  3. [SOLVED] Total line item sale qty to be sum in a cell as date wise
    By geromio in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-15-2013, 10:50 PM
  4. [SOLVED] I want change the data row wise to coloum wise & coloumn wise to row wise.
    By satputenandkumar0 in forum Excel General
    Replies: 3
    Last Post: 12-20-2012, 08:34 AM
  5. [SOLVED] define exact number of products sale from multiple sale and returned sale orders
    By maabadi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2012, 06:14 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