G
Greg H.
I am working on an ambitious project for my team to create a vacation
calendar. I need to be able to lock specific cells based on different
criteria. Below is a sample of what the sheet will look like:
A B C D E F
G
1 Name Reason Start Stop Total Time Notes
2 4/1/2008 Greg Appointment 10:00 12:00 2:00
3 4/2/2008
4 4/3/2008
Here are my criteria:
1) If the date in A2 is <= Today then protect A2:G2. Repeat for each day of
the month until date in column A is > Today, if date in column A is > Today
then unprotect that row of cells.
2) Once a name has been entered into column B and is set for a future date
that no one but that person whose name is on there can remove it. I have a
list of team members and a Windows login name (Greg = jonesgr, Bob = smithbo)
For example, assume today = 3/01/08. In cell B2 only someone with USERID of
jonesgr can modify that row. If Bob opens the excel document cells B2:G2
should be locked.
3) Final requirement is that me, the supervisor have complete, unrestricted
access to the entire document. So if my USERID accesses the document,
everything is unlocked.
I do not intend to have this workbook setup as a shared document because I
don’t want people trying to save their vacation on the same day and create
scheduling problems. I know I can hack some bad code together that will work
most of the time but I know that there is an easier way to do it. Any
assistance I can get would be greatly appreciated. Thanks
calendar. I need to be able to lock specific cells based on different
criteria. Below is a sample of what the sheet will look like:
A B C D E F
G
1 Name Reason Start Stop Total Time Notes
2 4/1/2008 Greg Appointment 10:00 12:00 2:00
3 4/2/2008
4 4/3/2008
Here are my criteria:
1) If the date in A2 is <= Today then protect A2:G2. Repeat for each day of
the month until date in column A is > Today, if date in column A is > Today
then unprotect that row of cells.
2) Once a name has been entered into column B and is set for a future date
that no one but that person whose name is on there can remove it. I have a
list of team members and a Windows login name (Greg = jonesgr, Bob = smithbo)
For example, assume today = 3/01/08. In cell B2 only someone with USERID of
jonesgr can modify that row. If Bob opens the excel document cells B2:G2
should be locked.
3) Final requirement is that me, the supervisor have complete, unrestricted
access to the entire document. So if my USERID accesses the document,
everything is unlocked.
I do not intend to have this workbook setup as a shared document because I
don’t want people trying to save their vacation on the same day and create
scheduling problems. I know I can hack some bad code together that will work
most of the time but I know that there is an easier way to do it. Any
assistance I can get would be greatly appreciated. Thanks