I have a kinda weird/advanced count situation for a work schedule project.
The table is like so:
So, to explain, if one person is OFF 2 days in a row, then add 1 to the grand total. If 2 people are OFF 2 days in a row, then you'd add 2 to the total. However, if a person is OFF one day (as in row 2) and not OFF again the following day, then don't add 1 to the total. By the way, this is a schedule for the whole year, and there is a total for each week.
Where is that image coming from? Is it an excel spreadsheet, or a formatted query output. If the latter, the query and the output code is more helpful than the image.
This image is from an excel spreadsheet that needs to be turned into an application. Any programming ideas would be appreciated.