Identifying room clashes with dates

MrFahad123

New Member
Joined
Jan 12, 2014
Messages
3
Hi Guys,

I wanted to ask for some advice on finding Room clashes (e.g two classes happening in the same room on the same date. My aim is to apply whatever method is advised to a large amount of data (1000 classes in 20 different rooms).

eg. below:
ROOMCOURSESTART DATEEND DATE
room1maths16/02/201417/02/2014
room1english18/02/201420/02/2014
room1chemistry22/02/201424/02/2014
room1physics25/02/201427/02/2014
room1football18/02/201420/02/2014

<tbody>
</tbody>

as you can see football clashes with english.



Thanks for your time.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Are you going to assign available classroom to different classes? or the input is done already (as shown) and you need to identify if there is any crash?
 
Upvote 0
try in E2, fill down

=SUMPRODUCT(--($A$2:$A$6=A2),--($C$2:$C$6<=D2),--($D$2:$D$6>=C2))

any result over 1 means a clash while 1 means no clash
 
Upvote 0
just in case you are using Excel 2007 or later, you may also consider
In E2
=COUNTIFS($A$2:$A$6,A2,$C$2:$C$6,"<="&D2,$D$2:$D$6,">="&C2)

to further elaborate jubjab's point, any result over 1 means a clash; the number actually reflects how many crashes encountered. 2 means 2 classes crashes for the same room for a particular date; 3 means 3 classes... etc.
 
Upvote 0
Hi mfexcel and jubjab,

Thank you so much, this information is helpful and works perfectly. What adjustments to the formula do I make if there are more than one room involed in the colum? Do I just replace criteria 1 with the whole column? (i.e; A:A instead of A2) and (i.e; C:C instead of C2)

again thanks for your prom
 
Upvote 0
You are welcome. Glad that it helps.

To extend the list, just change $A$2:$A$6 (and the ranges) to $A$2:$A$XXX where XXX is the last row of your table

Hi mfexcel and jubjab,

Thank you so much, this information is helpful and works perfectly. What adjustments to the formula do I make if there are more than one room involed in the colum? Do I just replace criteria 1 with the whole column? (i.e; A:A instead of A2) and (i.e; C:C instead of C2)

again thanks for your prom
 
Upvote 0

Forum statistics

Threads
1,215,214
Messages
6,123,665
Members
449,114
Latest member
aides

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