Conditional format for names between morning and evening shift

lxx28

New Member
Joined
Oct 21, 2015
Messages
23
Hi,

Hope this is placed in the right category.

I'm struggling to make a conditional format for the following:
If the person on de "Evening shift" is the same as the person the following day in de morning (the first of the 2 persons), I want to put the name in red and bold.

I have uploaded a file with how it is, and how I want it to be.
Hope somebody can help me :).

The file can be found here, hope it helps.

https://thestud.nl/wp-content/uploads/2018/08/Test.xlsx
 
Last edited:

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
the only difference I see is Dave in red, anyway all you need to do is put this conditional formatting on the evening shift - let us say the first evening shift is D3

in D3, cond formatting, =D3=D4
 
Upvote 0
Should I make 2 cond after each other.
Because even there are 2 persons in the Evening ****s, So if one of those persons are the first to open te next day, they should be marked red.
 
Upvote 0
I have the feeling I'm almost there, but it it's not completely what I want.
I use the following:
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px 'Lucida Grande'; color: #000000}</style>=OF(C5=B7,C5=B8) . (OF=OR in Dutch.

But now also "Co" C6 and "Tamara" E6 are marked black, but that did not start the shift.




Test.png
 
Upvote 0
[TABLE="width: 623"]
<colgroup><col><col span="2"><col span="2"><col><col><col span="2"></colgroup><tbody>[TR]
[TD][/TD]
[TD="align: right"]01/08/2018[/TD]
[TD="align: right"]02/08/2018[/TD]
[TD="align: right"]03/08/2018[/TD]
[TD="align: right"]04/08/2018[/TD]
[TD="align: right"]05/08/2018[/TD]
[TD="align: right"]06/08/2018[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]morning[/TD]
[TD]fred[/TD]
[TD]sid[/TD]
[TD]joe[/TD]
[TD]dave[/TD]
[TD]dave[/TD]
[TD]james[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]evening[/TD]
[TD]bill[/TD]
[TD]joe[/TD]
[TD]sid[/TD]
[TD]harry[/TD]
[TD]mike[/TD]
[TD]peter[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 5"]in this example, only joe on 3/8/18 should be highlighted[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 2"]is this correct ?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
[TABLE="width: 623"]
<tbody>[TR]
[TD][/TD]
[TD="align: right"]01/08/2018[/TD]
[TD="align: right"]02/08/2018[/TD]
[TD="align: right"]03/08/2018[/TD]
[TD="align: right"]04/08/2018[/TD]
[TD="align: right"]05/08/2018[/TD]
[TD="align: right"]06/08/2018[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]morning[/TD]
[TD]fred[/TD]
[TD]sid[/TD]
[TD]joe[/TD]
[TD]dave[/TD]
[TD]dave[/TD]
[TD]james[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]evening[/TD]
[TD]bill[/TD]
[TD]joe[/TD]
[TD]sid[/TD]
[TD]harry[/TD]
[TD]mike[/TD]
[TD]peter[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 5"]in this example, only joe on 3/8/18 should be highlighted[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 2"]is this correct ?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Yes in your example only Joe should be highlighted.
But in my example only Roy 24 Jan should be highlighted.
It doesn't matter if you are the first in the evenshift or the 2nd. But it's import for the first person that start the day.

So if roy was 2nd in the evening, but still first in the next morning, it should be highlighted
And if roy was 1st in the evening, bus also first in the next morning, it should be higlighted
If roy was 2nd in the evening, and 2nd the next morning, it should NOT be highlighted
If roy was 1st in the evening, and 2nd the next morning, it should NOT be hlighlight.

So only if you do the evening (doens't matter 1st or 2nd in the evening list), and the first in the morning shift, that it should be highlighted.

As english is not my native language, I still hope you understand me :)
 
Upvote 0
[TABLE="width: 687"]
<colgroup><col><col span="2"><col span="2"><col><col><col span="3"></colgroup><tbody>[TR]
[TD][/TD]
[TD="align: right"]01/08/2018[/TD]
[TD="align: right"]02/08/2018[/TD]
[TD="align: right"]03/08/2018[/TD]
[TD="align: right"]04/08/2018[/TD]
[TD="align: right"]05/08/2018[/TD]
[TD="align: right"]06/08/2018[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]morning1[/TD]
[TD]fred[/TD]
[TD]sid[/TD]
[TD]joe[/TD]
[TD]brian[/TD]
[TD]dave[/TD]
[TD]james[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]morning2[/TD]
[TD]bill[/TD]
[TD]charlie[/TD]
[TD]sid[/TD]
[TD]harry[/TD]
[TD]mike[/TD]
[TD]peter[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]evening1[/TD]
[TD]tom[/TD]
[TD]joe[/TD]
[TD]brian[/TD]
[TD]fred[/TD]
[TD]fred[/TD]
[TD]charlie[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]evening2[/TD]
[TD]george[/TD]
[TD]fred[/TD]
[TD]colin[/TD]
[TD]bill[/TD]
[TD]bill[/TD]
[TD]george[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 4"]so joe and brian only should be highlighted[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 3"]if so this formula does it[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="colspan: 4"]put it in C2 (sid) and drag across and down[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]=OR(C2=B4,C2=B5)=TRUE[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
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