+ Reply to Thread
Results 1 to 3 of 3

Workbook protection

  1. #1
    Registered User
    Join Date
    08-30-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    78

    Workbook protection

    Hi all,

    I have no idea if this is possible. Wondering if there is a way in which to restrict what a user can view when they access a spreadsheet.


    I have a costing template which gives a manager the ability to enter multiple key information in multiple cells which trigger different formula to determine what their budget for the year is going to be.

    The fields have to include salary and wages rates for their staff. However, I don't want a manager to be able to access the spreadsheet and lookup the pay details for anybody who is not part of their team.

    Therefore, what I'm wondering is whether there is a way in Excel for me to request that each person who opens the spreadsheet has to provide a password or a code that I provide each manager? Depending on which code they enter only certain sheets in the spreadsheet will be available to them.

    For example; when manager A opens the spreadsheet and he enters "0246" or some other pre-determined code then only the employees in Team A will be viewable. When manager B opens the spreadsheet and enters her own pre-determined code then she will be able to view both team B and Team C as she looks after both teams.


    The Review Tab seems a little to clumsy for this purpose but I probably don't know everything it can do.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Workbook protection

    I have a situation that is similar except that I am dealing with manufacturers instead of managers. I use the MS-Query function to pull up data for all manufacturers and save the data as a CSV file. Then on each spreadsheet for each manufacturer, I use MS-Query again to pull the data from the CSV file but only for that particular manufacturer. This is the version they get. So each manufacturer gets a custom report that contains only its data. It isn't a matter that they cannot see other manufacturers' data. The other manufacturers' isn't there to be seen.

    I do the two-step because the first query takes some time to get from the database. Otherwise, I could run a query against the database for each manufacturer. Overall, the two-step process is faster.

    This works because I have a limited number of manufacturers and I control the distribution of the reports. I also run this whole process using the Windows Task Manager so it's only a matter of QAing the report and emailing it. I can give you tips on how to do that.

    Another scheme I can think of is to put the salary information on a very hidden sheet along with the "password." Use the password as a filter on a pivot table on another very hidden sheet. Use a change event on a cell on a visible sheet. When the manager enters the password, the filter on the pivot table is set, and the employee information is copied to a visible page for the manager's use. Password protect the VBA code so the managers can't get to the hidden sheets or the data.

    This method isn't as secure as the customized version of the report since data for all employees is there even though hidden and difficult to get to.

    P.S. Ms-Query can read from almost any database, a CSV file or another excel spreadsheet.
    Last edited by dflak; 04-25-2016 at 01:49 PM. Reason: Add PS
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    08-30-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2007
    Posts
    78

    Re: Workbook protection

    Hi dflak,

    thanks for this reply. It's been a while but I have now come back to this question.

    I have a couple of criteria that make this a little different.


    I'm using payroll data for this particular model so it's a little sensitive. The model is to be used by various managers but those particular managers should only be able to see the costings for their own staff - no others.

    The MS Query idea works well in that I can extract updated payroll data through this query. Not sure how I'll get the data into the Excel workbook that runs the model but there are probably a couple of options such as running a macro. Would be ideal if there is an easy way that I could run the query through an active x button in Excel or something similar. If you have a hint on that I'm very much all ears.

    However, the next stage is that, once the data is in the workbook it can't be visible to the managers. I can hide the sheet and password protect it so that should be ok. However, I won't be here - this is a project for me where I come in and set up the model for the business to use after I'm gone. What I need is to be able to have it set up so that each of the managers has a different PIN or password that they enter in the model which allows them to view costs only for certain staff. The only way I can think of to do this is to have a password set up and an IF query to test if the password is correct. If so then a macro which would take that password and use it to filter which staff members will be picked up and bought into the model. Again, any hints as to an easier or slicker way of doing this would be gratefully appreciated.

+ 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. Workbook Protection
    By iamjustinpowell in forum Excel General
    Replies: 0
    Last Post: 04-28-2013, 11:27 AM
  2. Workbook Protection
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2010, 04:41 PM
  3. workbook protection
    By miyat in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-11-2009, 10:12 AM
  4. Workbook protection
    By vasto in forum Excel General
    Replies: 1
    Last Post: 01-12-2009, 01:11 PM
  5. Workbook protection
    By Bonbon in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-27-2006, 08:54 AM
  6. workbook protection
    By Hasty in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2006, 02:55 AM
  7. [SOLVED] Workbook Protection
    By Patrick Simonds in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-03-2005, 01:05 PM
  8. [SOLVED] Workbook Protection
    By AEK in forum Excel General
    Replies: 2
    Last Post: 06-22-2005, 09:05 PM

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