View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
VLH VLH is offline
external usenet poster
 
Posts: 7
Default Checking for conflicts in schedule

Hello,

I need to create a macro to check four columns of data;
start date/time
end date/time
teacher
assistant

that will let me know when there is a conflict in the schedule. For example
when a new class is added, I need the macro to search the columns and let me
know (in the fifth column) if the teacher or assistant is already scheduled
at that time.

I have tried to copy the schedule to a second sheet, sorting by start
date/time, and then usings a nested if statement to check the row just above
to see if either the teacher or assistant is already sheduled. The probem is
when there are several classes starting at the same time or close the same
time it doesn't check all the classes on that day.

=IF(AND(B4=B3, B4<=C3,OR(D4=D3,D4=E3,E4=D3,E4=E3)),"Conflict","")

Where the data is set up like this
B C D E F
Start Time End Time Teacher Assistant Conflict?

This is all done in a macro. Any help would be greatly appricated.

Thanks so much,
vlh