Shift Work Calendar - Conditional Formatting Formula

cpacs

New Member
Joined
Feb 22, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi, I'm trying to create a shift work calendar. I've attached an example of what I'm trying to achieve but please note it doesn't work as required... :confused::confused::confused:

I'd like to use the information on the "details" worksheet to control the conditional formatting on the "January" worksheet.

eg. I want the conditional formatting formula to look at the name in cell B8,B9,B10 etc. then match and look up the information from the "Details" worksheet (start date, shift pattern, shift code).

If an employee changes eg from Shift1 to Shift2 the conditional formatting colour would also need to change (four shift patterns, four different colours)

I've copied and pasted a few of my failed formula attempts below, hopefully they might help.

Excel Formula:
=IF(OR(NOT(ISNUMBER(D5)),D5<Job1_StartDate),"",IF(MID(INDIRECT("_"&$A$8),MOD(D5-Job1_StartDate,LEN(INDIRECT("_"&$A$8)))+1,1)=Job1_Shift1_Code,1,""))

=IF(OR(NOT(ISNUMBER(D5)),D5<Job1_StartDate),"",IF(MID(INDIRECT("_"&$A$11),MOD(D5-Job1_StartDate,LEN(INDIRECT("_"&$A$11)))+1,1)=Job1_Shift1_Code,1,""))

=IF(OR(NOT(ISNUMBER(d5)),d5<Job1_StartDate),"",IF(MID(INDIRECT(SUBSTITUTE($a10," ","_")),MOD(C5-Job1_StartDate,LEN(INDIRECT(SUBSTITUTE($a10," ","_"))))+1,1)=Job1_Shift1_Code,1,""))


=IF(OR(NOT(ISNUMBER(C5)),C5<Job1_StartDate),"",IF(MID(Job1_Pattern,MOD(C5-Job1_StartDate,LEN(Job1_Pattern))+1,1)=Job1_Shift1_Code,1,""))    - RED

=IF(OR(NOT(ISNUMBER(c5)),c5<Job2_StartDate),"",IF(MID(Job2_Pattern,MOD(c5-Job2_StartDate,LEN(Job2_Pattern))+1,1)=Job2_Shift1_Code,1,""))   - GREEN

=IF(OR(NOT(ISNUMBER(c5)),c5<Job3_StartDate),"",IF(MID(Job3_Pattern,MOD(c5-Job3_StartDate,LEN(Job3_Pattern))+1,1)=Job3_Shift1_Code,1,""))   -  BLUE


=IF(OR(NOT(ISNUMBER(D5)),D5<Job1_StartDate),"",IF(MID(INDIRECT("_"&$A$11),MOD(D5-Job1_StartDate,LEN(INDIRECT("_"&$A$11)))+1,1)=Job1_Shift1_Code,1,""))



=IF(OR(NOT(ISNUMBER(D5)),D5<Job1_StartDate),"",IF(MID(INDIRECT("_"&$A$8),MOD(D5-Job1_StartDate,LEN(INDIRECT("_"&$A$8)))+1,1)=Details!$S$2,1,""))
=IF(OR(NOT(ISNUMBER(D5)),D5<Job1_StartDate),"",IF(MID(INDIRECT("_"&$A$9),MOD(D5-Job1_StartDate,LEN(INDIRECT("_"&$A$9)))+1,1)=Job1_Shift1_Code,1,""))
=IF(OR(NOT(ISNUMBER(D5)),D5<Job1_StartDate),"",IF(MID(INDIRECT("_"&$A$10),MOD(D5-Job1_StartDate,LEN(INDIRECT("_"&$A$10)))+1,1)=Job1_Shift1_Code,1,""))
=IF(OR(NOT(ISNUMBER(D5)),D5<Job1_StartDate),"",IF(MID(INDIRECT("_"&$A$11),MOD(D5-Job1_StartDate,LEN(INDIRECT("_"&$A$11)))+1,1)=Details!$S$2,1,""))
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Shift Work Calendar - Conditional Formatting Formula
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,212
Members
449,074
Latest member
cancansova

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