Hotel room booking system

charl40winks

New Member
Joined
Jun 24, 2024
Messages
4
Office Version
  1. 2007
Platform
  1. Windows
I cannot seem to find a solution to my problem no matter how long I've been pondering on it. And to be honest I'm uncertain whether a solution is possible within excel.

I'm running a small hotel of 26 rooms. I have a table in an excel sheet with three columns: guest name, check-in date, and check-out date. The table is sorted by check-in date. I want to create a fourth column in which room numbers are going to be assigned automatically. This means that once a room number is assigned, it cannot be reassigned before the checkout date of the reservation it has already been assigned. Yet, after the checkout date, the corresponding room number should become available again to be assigned to another reservation.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
This is really unsophisticated as a solution but I think it does what you'd like. In column E there is a drop-down. It will not show rooms where the check-out date is past today's date. It will show rooms if the check-out date is today's date or later or there is no one assigned to it. So cell C2 is =today(), Row E is a drop-down list created by going in Data->Data Validation and selecting list to reference J5:J30. Then for H is =IFERROR(INDEX(D:D,MATCH(G5,E:E,)),0) and row J is =IF(H5>$C$2,"",G5). I did change the formatting in row H to be dates but when it is a zero value it shows a number just because then you can scan that table easy if a guest calls for a specific room and say when it is open.

Sorry I'm not as savvy as some others but thought I'd give an option.
 

Attachments

  • Screenshot 2024-06-24 135433.png
    Screenshot 2024-06-24 135433.png
    26.2 KB · Views: 22
Upvote 0
Solution

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

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