I wonder if you could help me, I'm relatively new to using VBA. I wanted a code that would allow my excel sheet to function a bit like project in the sense that I want to have sub tasks that you can hide and reveal with a click.
I want to have numerous projects on this sheet but they will all be to the same template: main project details followed by 5 'action/subtask' rows.
I would like to use data validation in the D column with hide/unhide. When 'HIDE' is selected the subtask rows are hidden, when 'UNHIDE' is selected they are unhidden.
I've tried to include the mini-sheet (this is an extract from a workbook with several sheets).
I want to have numerous projects on this sheet but they will all be to the same template: main project details followed by 5 'action/subtask' rows.
I would like to use data validation in the D column with hide/unhide. When 'HIDE' is selected the subtask rows are hidden, when 'UNHIDE' is selected they are unhidden.
I've tried to include the mini-sheet (this is an extract from a workbook with several sheets).
Whiteboard.xlsm | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | |||
4 | Dept. | START DATE | Hide/Unhide | Description | Manager | Priority | INFORMATION | Value | DUE DATE | Action Required | Action Due | Owner | Info Sent | Response | File Link | ||
5 | 31/08/2021 | HIDE | TEMPLATE | Manager 1 | A | Complete all tasks | 18-Sep (Sat) | 1 | |||||||||
6 | TEMPLATE - Sub Task 1 | E16194 Task 1 | 01-Sep (Wed) | ||||||||||||||
7 | TEMPLATE - Sub Task 2 | E16194 Task 2 | 04-Sep (Sat) | ||||||||||||||
8 | TEMPLATE - Sub Task 3 | E16194 Task 3 | 07-Sep (Tue) | ||||||||||||||
9 | TEMPLATE - Sub Task 4 | E16194 Task 4 | 17-Sep (Fri) | ||||||||||||||
10 | TEMPLATE - Sub Task 5 | E16194 Task 5 | 18-Sep (Sat) | ||||||||||||||
11 | 31/08/2021 | UNHIDE | PROJECT 1 | Manager 1 | B | Complete all tasks | 18-Sep (Sat) | 2 | |||||||||
12 | PROJECT 1 - Sub Task 1 | E16194 Task 1 | 01-Sep (Wed) | ||||||||||||||
13 | PROJECT 1 - Sub Task 2 | E16194 Task 2 | 04-Sep (Sat) | ||||||||||||||
14 | PROJECT 1 - Sub Task 3 | E16194 Task 3 | 07-Sep (Tue) | ||||||||||||||
15 | PROJECT 1 - Sub Task 4 | E16194 Task 4 | 17-Sep (Fri) | ||||||||||||||
16 | PROJECT 1 - Sub Task 5 | E16194 Task 5 | 18-Sep (Sat) | ||||||||||||||
17 | 01/09/2021 | PROJECT 2 | Manager 2 | A | RD to price | 10-Sep | 3 | ||||||||||
18 | PROJECT 2 - Sub Task 1 | E16194 Task 1 | 01-Sep (Wed) | ||||||||||||||
19 | PROJECT 2 - Sub Task 2 | E16194 Task 2 | 04-Sep (Sat) | ||||||||||||||
20 | PROJECT 2 - Sub Task 3 | E16194 Task 3 | 07-Sep (Tue) | ||||||||||||||
21 | PROJECT 2 - Sub Task 4 | E16194 Task 4 | 17-Sep (Fri) | ||||||||||||||
22 | PROJECT 2 - Sub Task 5 | E16194 Task 5 | 18-Sep (Sat) | ||||||||||||||
23 | |||||||||||||||||
ActionBoard |
Cell Formulas | ||
---|---|---|
Range | Formula | |
L5,L11 | L5 | =SUBTOTAL(4,L6:L10) |
E6,E18,E12 | E6 | =E5&" - Sub Task 1" |
E7,E19,E13 | E7 | =E5&" - Sub Task 2" |
E8,E20,E14 | E8 | =E5&" - Sub Task 3" |
E9,E21,E15 | E9 | =E5&" - Sub Task 4" |
E10,E22,E16 | E10 | =E5&" - Sub Task 5" |
L7:L8,L19:L20,L13:L14 | L7 | =L6+3 |
L9,L21,L15 | L9 | =L8+10 |
L10,L22,L16 | L10 | =L9+1 |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
L10 | Cell Value | between 1 and NOW() | text | NO |
L6:L9 | Cell Value | between 1 and NOW() | text | NO |
L22 | Cell Value | between 1 and NOW() | text | NO |
L18:L21 | Cell Value | between 1 and NOW() | text | NO |
F17 | Cell Value | contains "Andrew Galbraith" | text | NO |
F17 | Cell Value | contains "Colin McCurdy" | text | NO |
F17 | Cell Value | contains "Rob Denson" | text | NO |
F17 | Cell Value | contains "CB" | text | NO |
F11 | Cell Value | contains "Andrew Galbraith" | text | NO |
F11 | Cell Value | contains "Colin McCurdy" | text | NO |
F11 | Cell Value | contains "Rob Denson" | text | NO |
F11 | Cell Value | contains "CB" | text | NO |
F10 | Cell Value | contains "Andrew Galbraith" | text | NO |
F10 | Cell Value | contains "Colin McCurdy" | text | NO |
F10 | Cell Value | contains "Rob Denson" | text | NO |
F10 | Cell Value | contains "CB" | text | NO |
K5 | Cell Value | contains "MOVE TO PEND" | text | NO |
K5 | Cell Value | contains "MOVE TO PEND" | text | NO |
K5 | Cell Value | contains "MOVE TO PEND" | text | NO |
N5:N10 | Cell Value | >0 | text | NO |
M5:M10 | Cell Value | contains "AG" | text | NO |
M5:M10 | Cell Value | contains "CMC" | text | NO |
M5:M10 | Cell Value | contains "RD" | text | NO |
M5:M10 | Cell Value | contains "CB" | text | NO |
F5:F9 | Cell Value | contains "Andrew Galbraith" | text | NO |
F5:F9 | Cell Value | contains "Colin McCurdy" | text | NO |
F5:F9 | Cell Value | contains "Rob Denson" | text | NO |
F5:F9 | Cell Value | contains "CB" | text | NO |
L5 | Cell Value | between 1 and NOW() | text | NO |
F22 | Cell Value | contains "Andrew Galbraith" | text | NO |
F22 | Cell Value | contains "Colin McCurdy" | text | NO |
F22 | Cell Value | contains "Rob Denson" | text | NO |
F22 | Cell Value | contains "CB" | text | NO |
N18:N22 | Cell Value | >0 | text | NO |
M18:M22 | Cell Value | contains "AG" | text | NO |
M18:M22 | Cell Value | contains "CMC" | text | NO |
M18:M22 | Cell Value | contains "RD" | text | NO |
M18:M22 | Cell Value | contains "CB" | text | NO |
F18:F21 | Cell Value | contains "Andrew Galbraith" | text | NO |
F18:F21 | Cell Value | contains "Colin McCurdy" | text | NO |
F18:F21 | Cell Value | contains "Rob Denson" | text | NO |
F18:F21 | Cell Value | contains "CB" | text | NO |
F16 | Cell Value | contains "Andrew Galbraith" | text | NO |
F16 | Cell Value | contains "Colin McCurdy" | text | NO |
F16 | Cell Value | contains "Rob Denson" | text | NO |
F16 | Cell Value | contains "CB" | text | NO |
L16 | Cell Value | between 1 and NOW() | text | NO |
K11 | Cell Value | contains "MOVE TO PEND" | text | NO |
K11 | Cell Value | contains "MOVE TO PEND" | text | NO |
K11 | Cell Value | contains "MOVE TO PEND" | text | NO |
K1:K4,K17,K23:K1048576 | Cell Value | contains "MOVE TO PEND" | text | NO |
N1:N4,N11:N17,N23:N1048576 | Cell Value | >0 | text | NO |
M1:M4,M11:M17,M23:M1048576 | Cell Value | contains "AG" | text | NO |
M1:M4,M11:M17,M23:M1048576 | Cell Value | contains "CMC" | text | NO |
M1:M4,M11:M17,M23:M1048576 | Cell Value | contains "RD" | text | NO |
M1:M4,M11:M17,M23:M1048576 | Cell Value | contains "CB" | text | NO |
K1:K4,K17,K23:K1048576 | Cell Value | contains "MOVE TO PEND" | text | NO |
K1:K4,K17,K23:K1048576 | Cell Value | contains "MOVE TO PEND" | text | NO |
F12:F15 | Cell Value | contains "Andrew Galbraith" | text | NO |
F12:F15 | Cell Value | contains "Colin McCurdy" | text | NO |
F12:F15 | Cell Value | contains "Rob Denson" | text | NO |
F12:F15 | Cell Value | contains "CB" | text | NO |
L1:L4,L17,L11:L15,L23:L1048576 | Cell Value | between 1 and NOW() | text | NO |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
D11 | List | HIDE, UNHIDE |
D5 | List | HIDE, UNHIDE |
M5:M9 | List | =$C$27:$C$33 |
M23 | List | =$C$27:$C$33 |
M11:M15 | List | =$C$27:$C$33 |
M17:M21 | List | =$C$27:$C$33 |