I need a formula for searching. Its an assignment:
A customer wants appointment at a specific date and time for a specific Doctor.
Say, For D0004 (Doctor Id) at 21/12/2014 07:00PM
I have another sheet which have list of Past and future appointments with columns "Appointment ID,Doctor Id,Date and time".
The search must check that if the date is not Past and whether desired doctor is available at desired Date & time of customer and must return a Yes or No. It means search should check the doctor ID, date and time in each row and if matches in any row then return a "No" otherwise "Yes".
[TABLE="width: 348"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]Doctor ID[/TD]
[TD]Date[/TD]
[TD]Time[/TD]
[/TR]
[TR]
[TD]Apointment[/TD]
[TD]D0004[/TD]
[TD="align: right"]21/12/2014[/TD]
[TD="align: right"]19:00[/TD]
[/TR]
</tbody>[/TABLE]
Available= "Formula ?"
[TABLE="width: 417"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Appointment ID[/TD]
[TD]Doctor ID[/TD]
[TD]Patient ID[/TD]
[TD]Date[/TD]
[TD]Time[/TD]
[/TR]
[TR]
[TD]A0001[/TD]
[TD]D0001[/TD]
[TD]P0001[/TD]
[TD]10/12/2013[/TD]
[TD]10:00 AM[/TD]
[/TR]
[TR]
[TD]A0002[/TD]
[TD]D0002[/TD]
[TD]P0002[/TD]
[TD]11/12/2013[/TD]
[TD]12:00 PM[/TD]
[/TR]
[TR]
[TD]A0003[/TD]
[TD]D0003[/TD]
[TD]P0003[/TD]
[TD]12/12/2013[/TD]
[TD]9:00 AM[/TD]
[/TR]
[TR]
[TD]A0004[/TD]
[TD]D0004[/TD]
[TD]P0004[/TD]
[TD]13/12/2013[/TD]
[TD]7:30 PM[/TD]
[/TR]
[TR]
[TD]A0005[/TD]
[TD]D0005[/TD]
[TD]P0005[/TD]
[TD]14/12/2013[/TD]
[TD]6:30 PM[/TD]
[/TR]
[TR]
[TD]A0006[/TD]
[TD]D0006[/TD]
[TD]P0006[/TD]
[TD]15/12/2013[/TD]
[TD]4:00 PM[/TD]
[/TR]
[TR]
[TD]A0007[/TD]
[TD]D0007[/TD]
[TD]P0007[/TD]
[TD]16/12/2013[/TD]
[TD]7:30 PM[/TD]
[/TR]
[TR]
[TD]A0008[/TD]
[TD]D0008[/TD]
[TD]P0008[/TD]
[TD]17/12/2013[/TD]
[TD]9:00 AM[/TD]
[/TR]
[TR]
[TD]A0009[/TD]
[TD]D0009[/TD]
[TD]P0009[/TD]
[TD]18/12/2013[/TD]
[TD]8:00 AM[/TD]
[/TR]
[TR]
[TD]A0010[/TD]
[TD]D0010[/TD]
[TD]P0010[/TD]
[TD]19/12/2013[/TD]
[TD]7:00 PM[/TD]
[/TR]
[TR]
[TD]A0011[/TD]
[TD]D0009[/TD]
[TD]P0011[/TD]
[TD]20/12/2013[/TD]
[TD]5:00 PM[/TD]
[/TR]
[TR]
[TD]A0012[/TD]
[TD]D0004[/TD]
[TD]P0012[/TD]
[TD]21/12/2014[/TD]
[TD]7:00 PM[/TD]
[/TR]
</tbody>[/TABLE]
i hope i have delivered my question.
A customer wants appointment at a specific date and time for a specific Doctor.
Say, For D0004 (Doctor Id) at 21/12/2014 07:00PM
I have another sheet which have list of Past and future appointments with columns "Appointment ID,Doctor Id,Date and time".
The search must check that if the date is not Past and whether desired doctor is available at desired Date & time of customer and must return a Yes or No. It means search should check the doctor ID, date and time in each row and if matches in any row then return a "No" otherwise "Yes".
[TABLE="width: 348"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]Doctor ID[/TD]
[TD]Date[/TD]
[TD]Time[/TD]
[/TR]
[TR]
[TD]Apointment[/TD]
[TD]D0004[/TD]
[TD="align: right"]21/12/2014[/TD]
[TD="align: right"]19:00[/TD]
[/TR]
</tbody>[/TABLE]
Available= "Formula ?"
[TABLE="width: 417"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Appointment ID[/TD]
[TD]Doctor ID[/TD]
[TD]Patient ID[/TD]
[TD]Date[/TD]
[TD]Time[/TD]
[/TR]
[TR]
[TD]A0001[/TD]
[TD]D0001[/TD]
[TD]P0001[/TD]
[TD]10/12/2013[/TD]
[TD]10:00 AM[/TD]
[/TR]
[TR]
[TD]A0002[/TD]
[TD]D0002[/TD]
[TD]P0002[/TD]
[TD]11/12/2013[/TD]
[TD]12:00 PM[/TD]
[/TR]
[TR]
[TD]A0003[/TD]
[TD]D0003[/TD]
[TD]P0003[/TD]
[TD]12/12/2013[/TD]
[TD]9:00 AM[/TD]
[/TR]
[TR]
[TD]A0004[/TD]
[TD]D0004[/TD]
[TD]P0004[/TD]
[TD]13/12/2013[/TD]
[TD]7:30 PM[/TD]
[/TR]
[TR]
[TD]A0005[/TD]
[TD]D0005[/TD]
[TD]P0005[/TD]
[TD]14/12/2013[/TD]
[TD]6:30 PM[/TD]
[/TR]
[TR]
[TD]A0006[/TD]
[TD]D0006[/TD]
[TD]P0006[/TD]
[TD]15/12/2013[/TD]
[TD]4:00 PM[/TD]
[/TR]
[TR]
[TD]A0007[/TD]
[TD]D0007[/TD]
[TD]P0007[/TD]
[TD]16/12/2013[/TD]
[TD]7:30 PM[/TD]
[/TR]
[TR]
[TD]A0008[/TD]
[TD]D0008[/TD]
[TD]P0008[/TD]
[TD]17/12/2013[/TD]
[TD]9:00 AM[/TD]
[/TR]
[TR]
[TD]A0009[/TD]
[TD]D0009[/TD]
[TD]P0009[/TD]
[TD]18/12/2013[/TD]
[TD]8:00 AM[/TD]
[/TR]
[TR]
[TD]A0010[/TD]
[TD]D0010[/TD]
[TD]P0010[/TD]
[TD]19/12/2013[/TD]
[TD]7:00 PM[/TD]
[/TR]
[TR]
[TD]A0011[/TD]
[TD]D0009[/TD]
[TD]P0011[/TD]
[TD]20/12/2013[/TD]
[TD]5:00 PM[/TD]
[/TR]
[TR]
[TD]A0012[/TD]
[TD]D0004[/TD]
[TD]P0012[/TD]
[TD]21/12/2014[/TD]
[TD]7:00 PM[/TD]
[/TR]
</tbody>[/TABLE]
i hope i have delivered my question.