Highlighting cells next to those that are conditionally formatted

Copper Contributor

Hello,

 

I am trying to find help with a fire department shift calendar. 

 

  • A-Shift: Red
  • B-Shift: Green
  • C-Shift: Blue
  • D-Shift: Yellow

Each employee is assigned to a shift, along with a number (e.g. A1, B6, C4, D8). This called a debit day, which is an extra day that an employee works in a 32-day cycle to bring their work hours up to 48-hours per week. We have the formula that creates the debit day based on January 1st of each year.

 

Then we add conditional formatting to highlight the debit shifts to their respective colors (bulleted list above). Currently, I manually highlight the date cells in the "2020 Calendar" worksheet, so the end product looks like the "After manual HL" worksheet.

 

Now, for my question. Is there a conditional formatting rule that will automatically highlight the date cell (number form) the same color as the debit day cell to the right of the date?  

1 Reply

@Fyrmn472   I've not got a full solution yet, but I'm pretty sure it can be done. Just looking at what you have, though, it seems to me that you are doing things the hard way (this just in connection with your conditional formatting rules). You have created a gargantuan set of conditions, essentially one rule for each person (assuming that A1-D9 refer to different individuals). You could be a lot more efficient by just looking at the first letter of each box, using something like this in the condition, =IF(LEFT(A1,1)="A") , a formula that gets the left most character and compares it with "A" in this case, and then that can produce the color for ALL the members of the A shift. And so on down the line. In short, you'd end up with four lines in the conditional formatting rule. Rather than umpty-ump.

You might have to play around a bit to get the syntax right for the IF formula there in the conditional formatting; those are always tricky.

That done, I know you can refer to other columns in conditional formatting rules, so they apply a color to Column A when certain conditions are met in Column B; adjacent cells in a calendar format are a lot trickier and I'll not be able to spend any more time (Sorry)..

 

But I hope that other idea can be helpful, if not this year, perhaps in the future.