Hotel Booking Rooms Count

babar1988

New Member
Joined
Mar 10, 2022
Messages
11
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Web
I am using an excel file to count the hotel reserved room counts by entering the reservation details, for example:

if guests reserved 25th till 30th 2 double, it should the total rooms consumed from 25th till 30th, each day 2 units

if another guest booked from 25th till 27th 5 double rooms, then it means the total from 25th till 27th, the room reserved 7 and from 28 till 30th 2 rooms.

Room Chart-updatedrooms.xlsx
ABCDEFGHI
1S.No.Group NameCheck-inCheck-outNightsDoubleTripleQuadTotal
21Babar 125-Mar29-Mar42349
32Babar 225-Mar30-Mar52349
43Babar 325-Mar29-Mar42349
Data Sheet
Cell Formulas
RangeFormula
E2:E4E2=D2-C2
I2:I4I2=H2+F2+G2



Room Chart-updatedrooms.xlsx
ABCD
1DateDoubleTripleQuad
225-Mar20
326-Mar
427-Mar
528-Mar
629-Mar
730-Mar
831-Mar
91-Apr
102-Apr
113-Apr
124-Apr
135-Apr
146-Apr
157-Apr
168-Apr
Availablity Sheet
Cell Formulas
RangeFormula
B2B2=IF(AND(A2>='Data Sheet'!C2,A$2<='Data Sheet'!D2-1),'Data Sheet'!F2,0)
C2C2=IF(AND(A2>='Data Sheet'!D2,A$2<='Data Sheet'!E2-1),'Data Sheet'!G2,0)+IF(AND(B2>='Data Sheet'!D2,B$2<='Data Sheet'!E2-1),'Data Sheet'!G2,0)


if was using this formula, but found it not useful by applying all the cells and using two many columns.

=IF(AND(A2>='Data Sheet'!C2,A$2<='Data Sheet'!D2-1),'Data Sheet'!F2,0)

is there any way using VBA or formula to solve this issue?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I'm not understanding this question very well. Take the first row, for example, what is illustrated here? To me, it looks like a group named Babar 1 spent 4 nights during which they rented 2 double bedrooms, 3 triple rooms, & 4 quad rooms. Is that what's happening? Next, on the Availability Sheet, it seems like the result you're aiming for would just be a replication of the #'s associated with the first data set's room assignments. If you could, please elaborate on this. Perhaps fill in what the end result should be, and then we can work from there.
 
Upvote 0
Hi,

Do you mean something like this:

Book3.xlsx
ABCDEFGHI
1S.No.Group NameCheck-inCheck-outNightsDoubleTripleQuadTotal
21Babar 13/25/20223/29/202242349
32Babar 23/25/20223/30/202252349
43Babar 33/25/20223/29/202242349
Data Sheet


Book3.xlsx
ABCD
1DateDoubleTripleQuad
23/25/20226912
33/26/20226912
43/27/20226912
53/28/20226912
63/29/20226912
73/30/2022234
83/31/2022000
94/1/2022000
104/2/2022000
114/3/2022000
124/4/2022000
134/5/2022000
144/6/2022000
154/7/2022000
164/8/2022000
Sheet1049
Cell Formulas
RangeFormula
B2:D16B2=SUMPRODUCT(('Data Sheet'!$C$2:$C$4<=$A2)*('Data Sheet'!$D$2:$D$4>=$A2)*('Data Sheet'!$F$1:$H$1=B$1)*'Data Sheet'!$F$2:$H$4)
 
Upvote 0
Hi,

Do you mean something like this:

Book3.xlsx
ABCDEFGHI
1S.No.Group NameCheck-inCheck-outNightsDoubleTripleQuadTotal
21Babar 13/25/20223/29/202242349
32Babar 23/25/20223/30/202252349
43Babar 33/25/20223/29/202242349
Data Sheet


Book3.xlsx
ABCD
1DateDoubleTripleQuad
23/25/20226912
33/26/20226912
43/27/20226912
53/28/20226912
63/29/20226912
73/30/2022234
83/31/2022000
94/1/2022000
104/2/2022000
114/3/2022000
124/4/2022000
134/5/2022000
144/6/2022000
154/7/2022000
164/8/2022000
Sheet1049
Cell Formulas
RangeFormula
B2:D16B2=SUMPRODUCT(('Data Sheet'!$C$2:$C$4<=$A2)*('Data Sheet'!$D$2:$D$4>=$A2)*('Data Sheet'!$F$1:$H$1=B$1)*'Data Sheet'!$F$2:$H$4)
Hi @jtakw,

Thank you very much, yes i am looking for the same thing, please tell me how you did this.
 
Upvote 0
You're welcome.

If you want to see how the SUMPRODUCT is working here, you can Evaluate the formula, follow these steps:

  • Select the cell that you want to evaluate. ...
  • On the Formulas tab, in the Formula Auditing group, click Evaluate Formula.
  • Click Evaluate to examine the value of the underlined reference. ...
  • Continue until each part of the formula has been evaluated.
  • To see the evaluation again, click Restart.
 
Upvote 0
I'm not understanding this question very well. Take the first row, for example, what is illustrated here? To me, it looks like a group named Babar 1 spent 4 nights during which they rented 2 double bedrooms, 3 triple rooms, & 4 quad rooms. Is that what's happening? Next, on the Availability Sheet, it seems like the result you're aiming for would just be a replication of the #'s associated with the first data set's room assignments. If you could, please elaborate on this. Perhaps fill in what the end result should be, and then we can work from there.
Hi @gravanoc,

Thank you very much, This is the final results i am looking for.
Room Chart-updatedrooms.xlsx
ABCD
1DateDoubleTripleQuad
225-Mar6912
326-Mar6912
427-Mar6912
528-Mar6912
629-Mar6912
730-Mar234
Availablity Sheet


Room Chart-updatedrooms.xlsx
ABCDEFGHI
1S.No.Group NameCheck-inCheck-outNightsDoubleTripleQuadTotal
21Babar 125-Mar29-Mar42349
32Babar 225-Mar30-Mar52349
43Babar 325-Mar29-Mar42349
Data Sheet
Cell Formulas
RangeFormula
E2:E4E2=D2-C2
I2:I4I2=H2+F2+G2
 
Upvote 0
I'm puzzled by your Post # 6.

I Already gave you the formula to achieve the results.
 
Upvote 0
I'm puzzled by your Post # 6.

I Already gave you the formula to achieve the results.
hi @jtakw,


Thank you very much, all is working totally fine, I replied to him before saw your reply.

million thanks, bro.
 
Upvote 0
You're welcome.

But I think you're supposed to mark the Actual post providing the solution (i.e. Post # 3)
Not your own post.
 
Upvote 0
You're welcome.

But I think you're supposed to mark the Actual post providing the solution (i.e. Post # 3)
Not your own post.
Yes market post number #3

the last thing, if I don't want to count the checkout date, is there any solution for that?

mean check-in 25th checkout 30th for 2 double rooms

the count should show from 25th till 29th, please advise? and many thanks in advance

@jtakw
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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