Hi Everyone,
Hope you're having a great day.
I'm a bit out of my depth with a tool I'm creating for work, a simplified version of which I have attached for reference.
Requirement 1: If the current month (B4) exceeds any month in the range G6:AP6, the cells in that month's field (i.e. G9:G18 for month 'Nov-13' as determined by G6) should become locked and uneditable. This workbook will ultimately be protected with a password so I only need this to work as described above when the Workbook is locked. Ultimately, I will need to apply this macro to all the months in cells G6:AP6 so that any time B4 > the month in G6:AP6, that month's range is uneditable.
As you can see, I've used conditional formatting to colour the cells based on a similar formula in which the cells are coloured red if B4>G6 (or H6, etc.).
Requirement 2: If the month in the range G6:AP6 matches the current month (B4), the sum of cells G9:G17 (for month in G6) must equal the value in G7 (business days). If the month in the range G6:AP6 comes after the current month (B4), then the sum of the range G9:G18 (for month G6- note, I've deliberately left G18 out of the calculation when B4 = G6) can equal any value.
I've edited this sheet to include only 1 employee but the actual workbook I'm using will have up to 50 employees included in the rows below the first one.
Any assistance is much appreciated!
Regards,
Naas
Bookmarks