Bjudd07

New Member
Joined
Feb 10, 2017
Messages
3
I am creating a schedule for instructors, but there are specific parameters such as a requirement that there must be a 24 hour break in a 7 day period. I create the schedule with names in the far left column and the days of the month in the top row from left to right. I would like a conditional formatting to let me know if anyone has a 24/7 violation so that I can revisit day off awards before I begin assigning positions for each day. Any help is appreciated!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
How are you recording that a instructor is working or not working? It is helpful to show some sample data.
 
Upvote 0
Instructor 1Cqt1OffOffCqt2Cqt7Cqt1Cqt3Cqt5Cqt8
Instructor 2Cqt2Cqt2Cqt1Cqt3Cqt5Cqt6Cqt4Cqt2Off
Instructor 3Cqt3Cqt3Cqt2Off Cqt1Cqt2Cqt2Cqt1Off

<tbody>
</tbody>

In this example, the position the instructors teach are "cqt#" and their days off are labeled "Off". Instructors can only work 6 days in a row with out a day off. Instructor 2 has been scheduled more than 6 days in a row, so it would be nice if conditional formatting or a formula could detect an error if there are more than 6 cells consecutively that do not read "Off".

This is a small picture of what the calendar looks like since we schedule one month out, so all 30 days of the calendar are scheduled with so much text that it may be possible due to human error to create a 24/7 violation. Also, there are over 30 instructors, so it is a very tediuous talks, and not all I structure are qualified to teach each course, so it must be done manually.




How are you recording that a instructor is working or not working? It is helpful to show some sample data.
 
Upvote 0
A
B
C
D
E
F
G
H
I
J
1
2/1/17
2/2/17
2/3/17
2/4/17
2/5/17
2/6/17
2/7/17
2/8/17
2/9/17
2
Instructor 1
Cqt1
Off
Off
Cqt2
Cqt7
Cqt2
Cqt3
Cqt5
Cqt8
3
Instructor 2
Cqt2
Cqt2
Cqt2
Cqt2
Cqt2
Cqt2
Cqt2
Cqt2
Cqt2
4
Instructor 3
Cqt3
Cqt3
Cqt2
OffCqt1
Cqt2
Cqt2
Cqt21
Off

<tbody>
</tbody>


I think this is what you want.
Select the H2:AC99, where AC99 is the end of the month and all the instructors in Conditional Formatting use this formula and select your formatting
Code:
=ISERROR(MATCH("Off",B2:H2,0))
If there is no Off in the prior 7 cells this will format the 7th cell. H3 is formatted because B3:H3 does not contain Off. I3 is formatted because C3:I3 does not contain Off and so on.
 
Upvote 0
Thank you! That works!




ABCDEFGHIJ
12/1/172/2/172/3/172/4/172/5/172/6/172/7/172/8/172/9/17
2Instructor 1Cqt1OffOffCqt2Cqt7Cqt2Cqt3Cqt5Cqt8
3Instructor 2Cqt2Cqt2Cqt2Cqt2Cqt2Cqt2Cqt2Cqt2Cqt2
4Instructor 3Cqt3Cqt3Cqt2OffCqt1Cqt2Cqt2Cqt21Off

<tbody>
</tbody>


I think this is what you want.
Select the H2:AC99, where AC99 is the end of the month and all the instructors in Conditional Formatting use this formula and select your formatting
Code:
=ISERROR(MATCH("Off",B2:H2,0))
If there is no Off in the prior 7 cells this will format the 7th cell. H3 is formatted because B3:H3 does not contain Off. I3 is formatted because C3:I3 does not contain Off and so on.
 
Upvote 0

Forum statistics

Threads
1,214,992
Messages
6,122,631
Members
449,095
Latest member
bsb1122

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top