Highlighting with a Calendar created

OX_2005

New Member
Joined
Feb 29, 2024
Messages
45
Office Version
  1. 365
Platform
  1. Windows
So I am not sure if what I am trying to do is possible. But here goes. I have 2 teams that every other week they work Sun, Mon, Tues. of one week and the next every other week they work Sun, Mon, Tues. I have a calendar created and what I am trying to do is if in column "C" it says Team 1 or 3 it will highlight the days they do not work that week. Is what I am looking to do even possible?


1709935888463.png
 
OK, forget all that and try conditional formatting

for Teams 1 & 2
=OR(AND(MOD(VALUE(E$8)-45354,14)>=3, MOD(VALUE(E$8)-45354,14)<=6), AND(MOD(VALUE(E$8)-45354,14)>=11, MOD(VALUE(E$8)-45354,14)<=13))

for Team 3
=OR(AND(MOD(VALUE(E$8)-45354,14)>=0, MOD(VALUE(E$8)-45354,14)<=2), AND(MOD(VALUE(E$8)-45354,14)>=7, MOD(VALUE(E$8)-45354,14)<=10))
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
It looks like that is working perfectly. I just added 1 small tweak to the formula. only because we run with around 7 crews but those 3 are the only ones on a 4 on/3 off then 3 on/4 off

Teams 1 & 2
=IF(OR($C10="Team 1",$C10="Team 2"),OR(AND(MOD(VALUE(E$8)-45354,14)>=3, MOD(VALUE(E$8)-45354,14)<=6), AND(MOD(VALUE(E$8)-45354,14)>=11, MOD(VALUE(E$8)-45354,14)<=13)),"")

Team 3
=IF($C10="Team 3",OR(AND(MOD(VALUE(E$8)-45354,14)>=0, MOD(VALUE(E$8)-45354,14)<=2), AND(MOD(VALUE(E$8)-45354,14)>=7, MOD(VALUE(E$8)-45354,14)<=10)),"")
 
Upvote 0
I'm sure the macro would work if I had put it in the Worksheet_Change event, monitoring the month in J4, and including a line to clear current highlighting but that was an oversight on my part.

Anyway, glad I could help in getting something workable.
Good luck with the rest of your project.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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