Hide data and only allow manager to see his own staff

pyoung9890

New Member
Joined
Feb 2, 2007
Messages
4
I have a list of all staff (9000 plus rows) in OneDrive which is sorted by employee number’ I have already got the macro to sort these by faculty, school, and manager then individual on opening. It is possible that a manager will change an individual's reporting so could ‘move’ from her/his viewable range to another managers viewable range so range naming would need to be dynamic hence this sort on opening.

I now want to hide it all and only allow access to a manager to those rows (named range) that are his/her staff and would like VBA to determine these ranges based upon manager and again by school. Want to do this with username and perhaps a password personal to him and that all passwords are read from a list somewhere in the workbook.

Managers will then make some changes to his data and I’d like at each ‘save’ him/her to be asked if (s)he has completed her/his review, if ‘no’ the spreadsheet is saved, if ‘yes’ it is saved and an email sent to a supervising manager to say user xx has completed her/his review (using Flow/Teams perhaps).

Also considering if at this point the password should change and the manager be locked out of further changes


Completely new to VBA but reasonable at excel so hoping to use this as a learning. Any ideas?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,215,025
Messages
6,122,732
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top