If cell matches another cell, apply conditional formatting to another cell

SuperX7

New Member
Joined
Dec 29, 2017
Messages
11
Hi everyone...

This one's stumped me. I'm trying to create a staff roster where employees are selected from a drop down list.

The issue is that there could be instances where the same employee (in this case Employee 1) is working in a different location so may be listed elsewhere.

Is it possible, to conditional format the start and finish times IF the employee is listed elsewhere AND if the times fall within the same time window to avoid "double booking" or incorrect scheduling?

For example below I've managed to conditional format

B58:
=AND(B58>B48,B58<C48) - 1200 is after 1000 and before 1800

C58:
=(C58<C48) - 1700 is before 1800

Which indicates the schedule isn't possible as the times fall within ROW 48 with the same employee

This may be a long shot but I have to ask the experts here as its driving me nuts!


Screenshot 2024-11-08 at 01.11.28.png
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
How about:

Book1
ABC
1NameStartEnd
2Employee 110:0018:00
3
4Employee 28:0010:00
5
6Employee 38:0010:00
7
8Employee 312:0014:00
9
10Employee 39:3011:00
11
12Employee 112:0017:00
13
14
15
16
17
18
19
20
Sheet10
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:C20Expression=SUM(($A$2:$A$20=$A2)*(ROW($A$2:$A$20)<>ROW(A2))*(IF($C$2:$C$20<$C2,$C$2:$C$20,$C2)-IF($B$2:$B$20>$B2,$B$2:$B$20,$B2)>0))textNO
 
Upvote 0

Forum statistics

Threads
1,223,578
Messages
6,173,168
Members
452,504
Latest member
frankkeith2233

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