Calculate monthly booked percentage of hotel rooms

arendberg

New Member
Joined
Jan 23, 2024
Messages
21
Office Version
  1. 365
Platform
  1. MacOS
Hey all,

I have a very big Excel file with all our hotel reservations in it. Column A has arrival dates, Column B has departure dates and Column C has the Room name. Every row shows 1 reservation.
In another sheet I would like to show per month the percentage of nights that have been reserved. So I input the Room name in this new sheet in N1 and for every month I will get a percentage showing how many nights have been booked in that month.

So if you take Room 1 for January 2025 you can see that it has been booked for 7 nights. So sheet 2 should show me a percentage of 21.6%. January has 31 possible nights that can be booked, 7 / 31 * 100.

I have tried a lot of things but so far have not been able to get the correct formula.

Hopefully someone here is able to help, thanks in advance!!

Example.xlsx
ABC
1ArrivalDepartureRoom
25/1/245/3/24Room 2
35/1/245/4/24Room 1
45/9/245/20/24Room 2
55/12/245/17/24Room 1
65/27/245/29/24Room 2
76/4/246/7/24Room 2
86/6/246/9/24Room 1
96/7/246/11/24Room 2
106/12/246/16/24Room 2
116/14/246/18/24Room 1
126/20/246/23/24Room 2
136/21/246/23/24Room 1
146/23/246/25/24Room 1
156/23/246/25/24Room 2
166/25/246/30/24Room 1
176/29/248/27/24Room 2
187/5/247/9/24Room 1
197/14/247/19/24Room 1
207/23/247/26/24Room 1
217/29/248/4/24Room 1
228/9/248/12/24Room 1
238/12/248/15/24Room 1
248/16/248/18/24Room 1
258/18/248/22/24Room 1
268/25/248/29/24Room 1
278/29/248/31/24Room 2
288/29/249/1/24Room 1
298/31/249/3/24Room 2
309/3/249/7/24Room 2
319/4/249/6/24Room 1
329/8/249/11/24Room 2
339/16/249/20/24Room 2
349/17/249/22/24Room 1
3510/2/2410/4/24Room 1
3610/2/2410/5/24Room 2
3710/6/2410/7/24Room 1
3810/6/2410/10/24Room 2
3910/13/2410/17/24Room 2
4010/21/2410/25/24Room 2
4110/21/2410/27/24Room 1
4210/29/2411/10/24Room 1
4310/30/2411/1/24Room 2
4411/1/2411/3/24Room 2
4511/4/2411/8/24Room 2
4611/8/2411/10/24Room 2
4711/15/2411/17/24Room 1
4811/20/2411/24/24Room 1
4911/22/2411/24/24Room 2
5011/28/2411/29/24Room 1
5112/5/2412/7/24Room 2
5212/7/2412/9/24Room 1
5312/11/2412/14/24Room 1
5412/14/2412/16/24Room 2
5512/19/2412/22/24Room 2
5612/20/2412/22/24Room 1
5712/23/2412/27/24Room 2
5812/23/2412/27/24Room 1
5912/27/2412/30/24Room 1
6012/27/2412/30/24Room 2
6112/30/241/4/25Room 2
6212/31/241/4/25Room 1
631/17/251/19/25Room 1
641/18/251/25/25Room 2
651/19/251/24/25Room 1
661/25/252/1/25Room 2
672/14/252/21/25Room 2
682/20/252/25/25Room 1
692/21/253/1/25Room 2
703/10/253/15/25Room 1
713/17/253/20/25Room 1
723/17/253/23/25Room 2
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
2:72Expression=#REF!<>""textYES


Example.xlsx
ABCDEFGHIJKLMN
1May-24Jun-24Jul-24Aug-24Sep-24Oct-24Nov-24Dec-24Jan-25Feb-25Mar-25Apr-25Room 1
2Formula that shows 22,6%
Sheet2
 
Try adding this piece.
Rich (BB code):
=LET(a,$A$2:$A$76,b,$B$2:$B$76,em,EOMONTH(F2,0),e,IF(b>em,em+1,b)-IF(a<F2,F2,a),SUM(($C$2:$C$76=$S$1)*($D$2:$D$76="")*($E$2:$E$76<=$P$1)*IF(e<0,0,e))/DAY(em))
 
Upvote 0
Solution

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,224,507
Messages
6,179,176
Members
452,893
Latest member
denay

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