Colour cells between 2 times but leaving out lunchbreaks

Jackie Grant

New Member
Joined
Apr 30, 2017
Messages
10
Hi Guys, I'm stuck :confused:

I am trying to create a template for a work rota which allows me to schedule a team with various start and finish times, some with and without lunch breaks and split across 2 sites.

I have managed to cobble together most of it with a combination of formula and conditional formatting, but can't get it to leave the lunchbreaks blank so that I can see where the gaps in cover are on both sites.

I'm afraid I am self taught, therefore I don't understand some of the more technical terminology, and haven't figured out how to attach a screenshot, therefore I've tried to give an example of what I've done below - with some of the formula included:

=IF(AND(H$4>=$B5,H$4<=$E5),$F5," ")
The conditional formatting then colours in those cells which have AB in them in Green, or CD in Purple.
Ideally I would like those cells where a lunch break occurs to remain blank.

I hope this makes sense, as it's sure confused me.

I do hope someone can understand enough to be able to help me and thanks a million in advance.

Jackie x :)

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
4
Name
Start
Lunch
Lunch
Finish
Site am
Site pm
08:00
09:00
10:00
11:00
12:00
13:00
14:00
15:00
16:00
17:00
18:00
5
Bob
08:00
12:00
13:00
18:00
AB
CD
G
G
G
G
P
P
P
P
P
6
Beryl
10:00
16:00
CD
CD
P
P
P
P
P
P
P
7
Belinda
08:00
13:00
14:00
18:00
CD
AB
P
P
P
P
P
G
G
G
G
8
Bert
10:00
14:00
AB
AB
G
G
G
G
G

<tbody>
</tbody>
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Thank you so much James, I am all sorted.
I absolutely love Excel and you guys are all amazing.
I really think I need to get myself trained :)
 
Upvote 0
Congrats to SnakeHips ... :) who can read your mind ... :wink:
 
Upvote 0

Forum statistics

Threads
1,215,148
Messages
6,123,307
Members
449,095
Latest member
Chestertim

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