Hi, my friend has a hotel and wants me to devise a spreadsheet, I have guest date and time of arrival in column B and date and time left in C and he wants me to add a column that will calculate at any point if the guest occupancy reaches 9. I am stumped, any help would be greatly appreciated, thanks in advance.
[TABLE="width: 528"]
<COLGROUP><COL style="WIDTH: 145pt; mso-width-source: userset; mso-width-alt: 7058" width=193><COL style="WIDTH: 145pt; mso-width-source: userset; mso-width-alt: 7058" width=193><COL style="WIDTH: 116pt; mso-width-source: userset; mso-width-alt: 5632" width=154><COL style="WIDTH: 122pt; mso-width-source: userset; mso-width-alt: 5924" width=162><TBODY>[TR]
[TD="class: xl63, width: 193, bgcolor: transparent"]Guest Name[/TD]
[TD="class: xl63, width: 193, bgcolor: transparent"]Date & Time of arrival[/TD]
[TD="class: xl64, width: 154, bgcolor: transparent"]Date and time of leaving[/TD]
[TD="class: xl63, width: 162, bgcolor: transparent"]Time present[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: #92d050"] [/TD]
[TD="class: xl66, bgcolor: #92d050"]28/08/2015 15:00[/TD]
[TD="class: xl66, bgcolor: #92d050"]01/09/2015 13:35[/TD]
[TD="class: xl72, bgcolor: #92d050"]03 22:35[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: #92d050"] [/TD]
[TD="class: xl66, bgcolor: #92d050"]28/08/2015 15:30[/TD]
[TD="class: xl66, bgcolor: #92d050"]04/09/2015 11:45[/TD]
[TD="class: xl72, bgcolor: #92d050"]06 20:15[/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: #ffc000"] [/TD]
[TD="class: xl68, bgcolor: #ffc000"]30/08/2015 10:25[/TD]
[TD="class: xl68, bgcolor: #ffc000"]03/09/2015 12:30[/TD]
[TD="class: xl73, bgcolor: #ffc000"]04 02:05[/TD]
[/TR]
[TR]
[TD="class: xl69, bgcolor: #92d050"] [/TD]
[TD="class: xl70, bgcolor: #92d050"]01/09/2015 19:00[/TD]
[TD="class: xl71, bgcolor: #92d050"]05/09/2015 12:40[/TD]
[TD="class: xl74, bgcolor: #92d050"]03 17:40[/TD]
[/TR]
[TR]
[TD="class: xl69, bgcolor: #92d050"] [/TD]
[TD="class: xl70, bgcolor: #92d050"]02/09/2015 15:20[/TD]
[TD="class: xl71, bgcolor: #92d050"]05/09/2015 12:40[/TD]
[TD="class: xl74, bgcolor: #92d050"]02 21:20[/TD]
[/TR]
</TBODY>[/TABLE]
[TABLE="width: 528"]
<COLGROUP><COL style="WIDTH: 145pt; mso-width-source: userset; mso-width-alt: 7058" width=193><COL style="WIDTH: 145pt; mso-width-source: userset; mso-width-alt: 7058" width=193><COL style="WIDTH: 116pt; mso-width-source: userset; mso-width-alt: 5632" width=154><COL style="WIDTH: 122pt; mso-width-source: userset; mso-width-alt: 5924" width=162><TBODY>[TR]
[TD="class: xl63, width: 193, bgcolor: transparent"]Guest Name[/TD]
[TD="class: xl63, width: 193, bgcolor: transparent"]Date & Time of arrival[/TD]
[TD="class: xl64, width: 154, bgcolor: transparent"]Date and time of leaving[/TD]
[TD="class: xl63, width: 162, bgcolor: transparent"]Time present[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: #92d050"] [/TD]
[TD="class: xl66, bgcolor: #92d050"]28/08/2015 15:00[/TD]
[TD="class: xl66, bgcolor: #92d050"]01/09/2015 13:35[/TD]
[TD="class: xl72, bgcolor: #92d050"]03 22:35[/TD]
[/TR]
[TR]
[TD="class: xl65, bgcolor: #92d050"] [/TD]
[TD="class: xl66, bgcolor: #92d050"]28/08/2015 15:30[/TD]
[TD="class: xl66, bgcolor: #92d050"]04/09/2015 11:45[/TD]
[TD="class: xl72, bgcolor: #92d050"]06 20:15[/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: #ffc000"] [/TD]
[TD="class: xl68, bgcolor: #ffc000"]30/08/2015 10:25[/TD]
[TD="class: xl68, bgcolor: #ffc000"]03/09/2015 12:30[/TD]
[TD="class: xl73, bgcolor: #ffc000"]04 02:05[/TD]
[/TR]
[TR]
[TD="class: xl69, bgcolor: #92d050"] [/TD]
[TD="class: xl70, bgcolor: #92d050"]01/09/2015 19:00[/TD]
[TD="class: xl71, bgcolor: #92d050"]05/09/2015 12:40[/TD]
[TD="class: xl74, bgcolor: #92d050"]03 17:40[/TD]
[/TR]
[TR]
[TD="class: xl69, bgcolor: #92d050"] [/TD]
[TD="class: xl70, bgcolor: #92d050"]02/09/2015 15:20[/TD]
[TD="class: xl71, bgcolor: #92d050"]05/09/2015 12:40[/TD]
[TD="class: xl74, bgcolor: #92d050"]02 21:20[/TD]
[/TR]
</TBODY>[/TABLE]