+ Reply to Thread
Results 1 to 10 of 10

Need Some Help With a Dynamic Model

  1. #1
    Registered User
    Join Date
    03-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Need Some Help With a Dynamic Model

    Hey, this is my first post so I'll try to be as detailed and succinct as possible. I have an excel worksheet with around 2450 entries. Each entry (row) has information about a specific hotel booking at the same hotel. The hotel in question has 7 rooms. The columns of the worksheet have the date the reservation was made, the arrival date, the checkout date, the number of nights stayed, and the number of rooms reserved. What I need is to create another column which tells me how many rooms were available at the time that the booking was made.

    Any thoughts?
    Thanks so much for your help.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need Some Help With a Dynamic Model

    Welcome to the forum.

    Post a workbook.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Need Some Help With a Dynamic Model

    Thank you, Here's the workbook I'm working with. I tried setting up a matrix where days from beginning to end would be in columns and each entry would basically "ping" on the dates that the guest arrives. Unfortunately, the matrix was massive (2500x2000 ish) and crashed my comp.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Need Some Help With a Dynamic Model

    Any ideas? I'm totally at a loss on how to do this apart from manually entering it

  5. #5
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Need Some Help With a Dynamic Model

    what are you trying to compare exactly? how many rooms were still available out of the 7 on the arivial date?

    this will tell you how many rooms were availiable during the stay that that person booked.

    =7-COUNTIFS(B$1:B2,"<="&B2,C$1:C2,">="&C2)+1
    Last edited by DGagnon; 03-07-2012 at 12:27 AM.
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  6. #6
    Registered User
    Join Date
    03-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Need Some Help With a Dynamic Model

    Thats actually close to what I need, thanks so much for working on it. What I need is to know how many rooms were available at the time of the booking. So at the date in the "status date" column, how many rooms were remaining on the arrive date? (if entries were booked at the same time, it's no big deal which is included first)

    It'd be even better if there was some sort of way to split the rows that have more than one under the "nights" column into a separate entry for each night they stayed. (ie price/room type/everything else is the same but now there is a new row inserted under the old row that says 1 night, and the new check-in/checkout date.

    Thanks so much for your help so far!

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need Some Help With a Dynamic Model

    I think DG has you on the right track, but doesn't account for the number of rooms booked.

    =8 - SUMPRODUCT((B$1:B2 <= B2) * (C$1:C2 > B2), E$1:E2)

    tells you as of the status date how rooms were available

  8. #8
    Registered User
    Join Date
    03-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Need Some Help With a Dynamic Model

    Thanks so much, that looks great. I may be mistaken, but wouldn't this be problematic when the "nights" column when someone stays more than one night? So if they are staying for a week, their reservation for the first night would look like they booked 7 rooms. So when the previous entry booked 10 nights,it looks like there are -3 rooms available at the time of the next booking. Is there a way to automatically split the rows so that each night's booking is an individual row?

  9. #9
    Registered User
    Join Date
    03-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Need Some Help With a Dynamic Model

    Is there a way to set up a macro that would split the rows up so that each row is a single day entry?

  10. #10
    Registered User
    Join Date
    03-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Need Some Help With a Dynamic Model

    Anyone? Still struggling here haha

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1