I am using Windows 10 |
I am using Office 2019 |
I am using UK based date formats |
Use Case |
I have a dataset which is used for tracking purposes on a specified dates. The number of specified dates in a year are variable, in number, and will be in future years. |
Columns I15:AG34 are manually updated depending on category via data validation |
I have created a table for my dataset |
I am trying to count the number of occurrences for each person against the options that each cell allows e.g. PAC, NPC,ACI,NAC,CNH, NCI and NRA - in total and over set time periods |
I have included in the attachment examples of pre and post worksheets
Challenges
a) If I add a new column AH onwards the formulas do not get updated to reflect the additional column so is excluded from the countifs formula
b) I am unclear how I can count the number of occurrences over specified time periods e.g. 1 and 3 and 5 year period and roll that forward.
What I would like to happen
1) As the number of columns will continue to be added (column AH onwards) I would like the formulas in columns (B15:H34) to update as well so that I don’t have to manually update (been using countifs and today() without success)
2) To create some metrics to; count the number of occurrences for each variable e.g. PAC, NPC, ACI, NAC, CNH, NCI and NRA for each member name and over;
- All time periods
- 1 year - From todays() date back one year from 2021 to 2020
- 3 years - From todays() date back 3 years from 2021 back to 2018
- 5 years - From todays() date back 5 years from 2021 back to 2015
The metrics is going to take much of the screen real estate which is of concern to me. Ideally, I would like to locate metrics against each member name in a separate worksheet but have concerns getting the member names / metrics out of sync. Any thoughts of how I can overcome?
Thank you for your time and support.
Simple attendance records v0.1.xlsx | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | |||
14 | Member Names | (PAC) | (NPC) | (ACI) | (NAC) | (CNH) | (NCI) | (NRA) | 05/02/2015 | 09/04/2015 | 01/10/2015 | 04/02/2016 | 14/04/2016 | 06/10/2016 | 02/02/2017 | 13/04/2017 | 05/10/2017 | 01/02/2018 | 12/04/2018 | 04/10/2018 | 07/02/2019 | 11/04/2019 | 03/10/2019 | 06/02/2020 | 09/04/2020 | 01/10/2020 | 04/02/2021 | 08/04/2021 | 01/05/2021 | 02/05/2021 | 03/05/2021 | 20/05/2021 | ||
15 | Person 1 | 4 | 12 | 1 | 1 | 4 | 0 | 3 | NPC | NPC | NPC | PAC | NPC | PAC | NPC | NPC | NPC | NPC | NPC | NPC | PAC | NPC | PAC | NPC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | ||
16 | Person 2 | 2 | 1 | 1 | 1 | 4 | 0 | 3 | PAC | NPC | PAC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | |||||||||||||||
17 | Person 3 | 16 | 0 | 2 | 0 | 4 | 0 | 3 | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | ||
18 | Person 4 | 12 | 4 | 2 | 0 | 4 | 0 | 3 | NPC | PAC | PAC | PAC | PAC | PAC | NPC | NPC | PAC | PAC | NPC | PAC | PAC | PAC | PAC | PAC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | ||
19 | Person 5 | 11 | 3 | 2 | 0 | 4 | 0 | 3 | PAC | PAC | NPC | PAC | PAC | PAC | PAC | PAC | NPC | NPC | PAC | PAC | PAC | PAC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | ||||
20 | Person 6 | 2 | 11 | 2 | 0 | 4 | 0 | 3 | PAC | NPC | NPC | NPC | PAC | NPC | NPC | NPC | NPC | NPC | NPC | NPC | NPC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | |||||
21 | Person 50 | 5 | 3 | 2 | 0 | 4 | 0 | 3 | NPC | NPC | PAC | PAC | PAC | PAC | PAC | NPC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | ||||||||||
22 | Person 100 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | PAC | |||||||||||||||||||||||||
23 | Person 101 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | PAC | |||||||||||||||||||||||||
24 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
26 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
27 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
28 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
29 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
30 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
31 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
32 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
33 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
34 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |||||||||||||||||||||||||||
Attendance |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B15:B34 | B15 | =COUNTIFS(Member_Attendance_Records[@[05/02/2015]:[23/05/2021]],"pac") |
C15:C34 | C15 | =COUNTIFS(Member_Attendance_Records[@[05/02/2015]:[23/05/2021]],"npc") |
D15:D34 | D15 | =COUNTIFS(Member_Attendance_Records[@[05/02/2015]:[23/05/2021]],"aci") |
E15:E34 | E15 | =COUNTIFS(Member_Attendance_Records[@[05/02/2015]:[23/05/2021]],"nac") |
F15:F34 | F15 | =COUNTIFS(Member_Attendance_Records[@[05/02/2015]:[23/05/2021]],"cnh") |
G15:G34 | G15 | =COUNTIFS(Member_Attendance_Records[@[05/02/2015]:[23/05/2021]],"nci") |
H15:H34 | H15 | =COUNTIFS(Member_Attendance_Records[@[05/02/2015]:[23/05/2021]],"nra") |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
AC15:AE17 | List | =INDIRECT("member_attendance_category") |
AF15:AF21 | List | =INDIRECT("member_attendance_category") |
I16:AB17 | List | =INDIRECT("member_attendance_category") |
I18:AE34 | List | =INDIRECT("member_attendance_category") |
Outcome
Member Names | All Years (PAC) | Last Year (PAC) | Last 3 years (PAC) | Last 5 years (PAC) | All Years (NPC) | Last Year (NPC) | Last 3 years (NPC) | Last 5 years (NPC) | All Years (ACI) | All Years (NAC) | All Years (CNH) | All Years (NCI) | All Years (NRA) | Last Year (NRA) | Last 3 years (NRA) | Last 5 years (NRA) | 05/02/2015 | 09/04/2015 | 01/10/2015 | 04/02/2016 | 14/04/2016 | 06/10/2016 | 02/02/2017 | 13/04/2017 | 05/10/2017 | 01/02/2018 | 12/04/2018 | 04/10/2018 | 07/02/2019 | 11/04/2019 | 03/10/2019 | 06/02/2020 | 09/04/2020 | 01/10/2020 | 04/02/2021 | 08/04/2021 | 01/05/2021 | 02/05/2021 | 03/05/2021 | 20/05/2021 | 23/05/2021 |
Person 1 | 5 | 1 | 3 | 4 | 8 | 1 | 5 | 12 | 3 | 3 | 3 | 3 | NPC | NPC | NPC | PAC | NPC | PAC | NPC | NPC | NPC | NPC | NPC | NPC | PAC | NPC | PAC | NPC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | PAC | ||||
Person 2 | 2 | 1 | 2 | 2 | 1 | 0 | 1 | 1 | 3 | 3 | 3 | 3 | PAC | NPC | PAC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | NAC | |||||||||||||||||
Person 3 | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | PAC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | ACI | ||||||||||||||||
Person 4 | NPC | PAC | PAC | PAC | PAC | PAC | NPC | NPC | PAC | PAC | NPC | PAC | PAC | PAC | PAC | PAC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | ACI | ||||||||||||||||
Person 5 | PAC | PAC | NPC | PAC | PAC | PAC | PAC | PAC | NPC | NPC | PAC | PAC | PAC | PAC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | ACI | ||||||||||||||||||
Person 6 | PAC | NPC | NPC | NPC | PAC | NPC | NPC | NPC | NPC | NPC | NPC | NPC | NPC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | ACI | |||||||||||||||||||
Person 50 | NPC | NPC | PAC | PAC | PAC | PAC | PAC | NPC | CNH | CNH | CNH | CNH | NRA | NRA | NRA | ACI | ACI | ||||||||||||||||||||||||
Person 100 | PAC | ||||||||||||||||||||||||||||||||||||||||
Person 101 | PAC | ||||||||||||||||||||||||||||||||||||||||