Calculating Total Cost for Rooming List with additional Hotel Matrix Sheet

I'm trying to calculate the 'Estimated Total Cost' for a traveller staying at a hotel. I have a rooming list sheet and a hotel matrix sheet. The rooming list has each traveller on each row and the '1' represents that they are staying that night.
The hotel matrix sheet has the room types, dates, nightly rates and total. However each night can change price which makes the calculation much more difficult to do
Can anyone assist how I could calculate the total cost per person staying at the hotel?
Best Answer
-
Try this:
=SUMIFS({Nightly Rate}, {Room Type}, @cell = [Room Type]@row, {Dates}, AND(@cell >= [Start Date]@row, @cell < [End Date]@row))
Answers
-
Do you have columns for more than just those 3 days? Is it possible there would be multiple stays such as Days 1 - 3 and then again for Days 9 - 12?
-
Hi Paul, there would be no break in stay dates, just consecutive.
Thanks.
-
Ok. Assuming you have a [Start Date] column that indicates the first day and an [End Date] column that indicates the last day, you could use something along the lines of
=SUMIFS({Nightly Rate}, {Room Type}, @cell = [Room Type]@row, {Dates}, AND(@cell >= [Start Date]@row, @cell <= [End Date]@row))
-
Hi Paul,
Thanks so much for your help. It's very close but it's returning an extra night's cost at the end.
So if the check-in date column reads 5th April and check-out is 10th April it should sum 5 nights but it's including the night of the 10th April in the calculation as well, so 6.
-
Try this:
=SUMIFS({Nightly Rate}, {Room Type}, @cell = [Room Type]@row, {Dates}, AND(@cell >= [Start Date]@row, @cell < [End Date]@row))
-
That works perfectly, thanks so much for your help !
Help Article Resources
Categories
Check out the Formula Handbook template!