I have a complex employee schedule spanning one year with 25 individuals in a Google Sheets format. Each individual may have more than one duty on a given day and these are delimited by commas currently. Here is a shortened and simplified sample as I cannot attach the original sheet to respect anonymity of coworkers:
| 1/1/2022 | 1/2/2022 | 1/3/2022 | 1/4/2022 | 1/5/2022 | 1/6/2022 | 1/7/2022 | 1/8/2022 | 1/9/2022 | 1/10/2022 | 1/11/2022 | 1/12/2022 | 1/13/2022 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Person 1 | Office, , | Lab, , | Office, , | Rounder, , | Rounder, Night Call , | Back Up Call, Rounder, | Back Up Call, Rounder, | Rounder, , | Rounder, , | Rounder, , | Office, , | ||
| Person 2 | Rounder, , | Rounder, , | Rounder, , | Rounder, , | Rounder, , | Office, , | Office, , | , , | , , | Office, , | Office, , | Office, , | Office, , |
| Person 3 | Back Up Call | Night Call, Rounder, | Back Up Call, Rounder, | Office,, | Office, , | Lab, , | Lab, , | , , | , , | Office, , | Lab, , | Office, , | Rounder, , |
| Person 4 | , | , | Vacation, | Vacation, | Office, | Rounder, | Rounder, | Rounder, | Night Call, Rounder | Rounder, | Rounder, | Rounder, | Office, |
| Person 5 | , | , | Vacation, | Back Up Call, | Night Call, , | Back Up Call, | Vacation, | , | , | Vacation, | Vacation, | Vacation, | Vacation, |
To ensure fairness, I need to quantify how often certain events occur. I was helped greatly by member Osm with a solution to Count the same event occurring multiple days in a row. I have worked through that solution and understand it now, but have hit another snag. I need to count the frequency of the following sequences:
-Back Up Call | Back Up Call | Night Call
-Back Up Call | Night Call | Back Up Call
-Night Call | Back Up Call | Back Up Call
I would like the output to look something like this:
| Backup/Backup/Call | Backup/Call/Backup | Call/Backup/Backup | |
|---|---|---|---|
| Person 1 | 0 | 0 | 0 |
| Person 2 | 2 | 0 | 0 |
| Person 3 | 1 | 1 | 0 |
| Person 4 | 0 | 2 | 1 |
| Person 5 | 3 | 0 | 0 |
So far I have tried variations of IF function but I am new to array formulas and the difference in syntax that is allowed is tripping me up. I have also begun working through using REGEXREPLACE and representing each of these various text strings as a different number and getting sums, but this does not allow me to determine the order the shifts occurred in.
Does anyone have a solution which might work for this? Thank you very much, in advance.


