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?
 
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

Just take out the = after D2:D4, use this instead:

Excel Formula:
=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
Solution

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Just take out the = after D2:D4, use this instead:

Excel Formula:
=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)
Thank you soo much ❤️
❤️
 
Upvote 0
You're welcome, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,472
Messages
6,125,005
Members
449,203
Latest member
Daymo66

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