+ Reply to Thread
Results 1 to 11 of 11

dates breakdown

  1. #1
    Registered User
    Join Date
    09-30-2015
    Location
    Brussels
    MS-Off Ver
    2013
    Posts
    9

    Question dates breakdown

    Good morning all,

    I need your help for the following case:

    I work for a hotel company and I need to make some statistics.

    I have a list of arrival dates and departure dates of guests.

    Arrival date: Departure date:
    21/05/2015 08/06/2015
    24/05/2015 07/06/2015
    30/05/2015 02/06/2015
    30/05/2015 02/06/2015

    From this, I would like to make a recap of the number of rooms that stayed per day. (should be something like this
    21/05/2015: 1
    22/05/2015: 1
    23/05/2015: 1
    24/05/2015: 2
    25/05/2015: 2
    26/05/2015: 2
    etc etc...

    Can anyone help me in this matter?

    Thanks from Belgium!!

    Adrien
    Last edited by adrienmeszaros; 09-30-2015 at 05:20 AM. Reason: Solved

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: dates breakdown

    Please attach a sample file and
    if a person arrived on 21-5-15 and departs on 22-5-15 and another person arrived on 22-5-15 and departs on 23-5-15
    in this case how many rooms to show 2 OR 1
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    09-29-2015
    Location
    Essex, England
    MS-Off Ver
    2013
    Posts
    10

    Re: dates breakdown

    You could make yourself a mini-calendar, and then total up the stays for each day.

    With the rows being a unique reference and the arrival and departure dates for each stay, the columns could be the dates. Each cell in the table would have a formula similar to this (adjust as necessary to the position of your table):

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You could then count up the number of non-blank cells for a particular day using this (applied as an array formula using CTRL+SHIFT+ENTER; adjust as necessary for the position/size of your table):

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See attached for a working example.
    Hotel Calendar Dates.xlsx

  4. #4
    Registered User
    Join Date
    09-30-2015
    Location
    Brussels
    MS-Off Ver
    2013
    Posts
    9

    Re: dates breakdown

    Quote Originally Posted by nflsales View Post
    Please attach a sample file and
    if a person arrived on 21-5-15 and departs on 22-5-15 and another person arrived on 22-5-15 and departs on 23-5-15
    in this case how many rooms to show 2 OR 1
    Dear Siva,

    Thanks for your fast answer!

    I attach a sample file.
    sample file.xlsx

    if a person arrived on 21-5-15 and departs on 22-5-15 and another person arrived on 22-5-15 and departs on 23-5-15
    ==> then the report should say: 21/5/15: 1 and 22/5/15: 1

    However, if a person arrived on 21-5-15 and departs on 23-5-15 and another person arrived on 22-5-15 and departs on 23-5-15
    ==> then the report should say: 21/5/15: 1 and 22/5/15: 2

    Thanks a lot!

    Adrien

  5. #5
    Registered User
    Join Date
    09-29-2015
    Location
    Essex, England
    MS-Off Ver
    2013
    Posts
    10

    Re: dates breakdown

    in that case you will just need to adjust my first formula to:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-30-2015
    Location
    Brussels
    MS-Off Ver
    2013
    Posts
    9

    Re: dates breakdown

    Quote Originally Posted by mattsmith View Post
    in that case you will just need to adjust my first formula to:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thanks a lot for your replies! This works perfectly.

  7. #7
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: dates breakdown

    D2=COUNTIFS($A$2:$A$57,"<="&$C2,$B$2:$B$57,">="&$C2)
    Please Login or Register  to view this content.
    Here c2 is the date for which you are looking for count the rooms
    see attached file
    Attached Files Attached Files

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: dates breakdown

    Hi, and welcome to the forum.

    With your list of incremental dates in E2 starting with 21/5/2015, enter in say F2 as an array formula i.e. with Ctrl Shift Enter

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  9. #9
    Registered User
    Join Date
    09-30-2015
    Location
    Brussels
    MS-Off Ver
    2013
    Posts
    9

    Re: dates breakdown

    Quote Originally Posted by nflsales View Post
    D2=COUNTIFS($A$2:$A$57,"<="&$C2,$B$2:$B$57,">="&$C2)
    Please Login or Register  to view this content.
    Here c2 is the date for which you are looking for count the rooms
    see attached file
    Dear Siva,

    I have a question regarding this formula (I attach a sample file)
    sample file.xlsx

    I have applied the formula successfully. However, when I count the total of room nights in column C, this should normally be equal to the sum in column F. Unfortunately it is not the case here.

    Did I do anything wrong?

    Thanks again for your kind help!

    Adrien

  10. #10
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: dates breakdown

    That's what I asked in Post No.2
    see the attached file
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    09-30-2015
    Location
    Brussels
    MS-Off Ver
    2013
    Posts
    9

    Re: dates breakdown

    All good now, thanks a lot!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Breakdown Please
    By Shoey263 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-22-2014, 04:53 AM
  2. Breakdown of total
    By Chizz247 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-17-2012, 07:04 AM
  3. Breakdown a formula
    By Lucky_git in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-10-2011, 11:08 AM
  4. Breakdown to this solution
    By duendz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-08-2009, 02:57 AM
  5. Breakdown
    By AJ in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-03-2006, 04:10 PM
  6. How 2 breakdown $$$ into $ $ $?
    By mjpage in forum Excel General
    Replies: 2
    Last Post: 01-07-2006, 08:20 PM
  7. Numerical Breakdown
    By HUBBUB88 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-17-2005, 05:05 PM

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