Try these 2 files for size. Open and allow macros
The files are identical except for their name
Currently the files are set to autosave when closed (temporary while still working on it)
Each file contains
- sheet("Data") - with all the data (set to VeryHidden)
- sheet("myData") - into which an individual manager's data is copied (set to VeryHidden)
- sheet("myPivot) - which contains the manager's own pivot table based on his "myData" (set to VeryHidden at time of opening)
When the files are opened
- only blank Sheet1 is visible AND
- a password is required (captured in a text box)
The files have different passwords (both have upper case first letter)
file "mike..." = Hisword
file "sueb..." = Herword
When the password has been entered, the code checks to see if "1st 4 chars of filename" + "password" matches pre-designated string.
If the string matches
- sheet myPivot is unhidden
- pivot table is immediately updated with managers data
- manager's data set is based on cell "A1" value which is currently = "1st 4 characters of file name"
In the example files the 2 managers' pivot includes details for different staff
At the moment this is not bomb proof (otherwises becomes a pain to work on) - need to protect the vba etc and prevent user saving changes etc.
I believe this goes a long way towards meeting your needs
- you may prefer (for data security reasons) to piecemeal the actual data rather than putting "all" in each
Let me know what you think and then I will tell you how to amend it to test it out on your own data
this is how a managers selections are grouped:
this is how the the selected data is copied into sheet myData and the pivot table refreshed
this is the password control when the file is opened (driven via textbox on UserForm which is presented as the file opens)
Bookmarks