+ Reply to Thread
Results 1 to 12 of 12

Formula- count # of guests for every hour based on arrival and end time

Hybrid View

  1. #1
    Registered User
    Join Date
    03-15-2013
    Location
    Baltimore
    MS-Off Ver
    Excel 2010
    Posts
    33

    Formula- count # of guests for every hour based on arrival and end time

    Hello,

    I am trying to count the # of guests there were at every hour from arrival to end/departure time. All are night guests and most were there past midnight.

    I used the formula suggested in one of the threads here but it's giving me negative results and/or not accurately counting guests.

    Thanks in advance for your valuable help.

    Jomejorada
    Attached Files Attached Files

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Formula- count # of guests for every hour based on arrival and end time

    HI Jomejorada,

    Try below formula:-

    Formula: copy to clipboard
    =SUMPRODUCT(($B$2:$B$294>=$G2)*($C$2:$C$294<=$H2))



    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    03-15-2013
    Location
    Baltimore
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Formula- count # of guests for every hour based on arrival and end time

    Thanks, I copied your formula but it's resulting to 0.

    Is it possible for you to send the attachment with your formula?

    Thanks for your help.
    J

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Formula- count # of guests for every hour based on arrival and end time

    Okay.. see the attachment - green cell.

    Project.xlsx


    Regards,
    DILIPandey
    <click on below * if this helps>

  5. #5
    Registered User
    Join Date
    03-15-2013
    Location
    Baltimore
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Formula- count # of guests for every hour based on arrival and end time

    Thank you very much for your help! You just made my day!!!

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Formula- count # of guests for every hour based on arrival and end time

    Cheers


    You are welcome Jomejorada.... please mark this thread as [SOLVED].. Thanks


    Regards,
    DILIPandey
    <click on below * if this helps>

  7. #7
    Registered User
    Join Date
    03-15-2013
    Location
    Baltimore
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Formula- count # of guests for every hour based on arrival and end time

    Hi again,

    I'm sorry I just got the chance to review this closely, looks like it doesn't capture everything, e.g. 24:00-24:59 is 0 when there are guests at this time frame. Thanks again.

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Formula- count # of guests for every hour based on arrival and end time

    HI Jomejorada,

    24:00 and 24:59 should not be there as this 12:00 AM to 12:59 AM

    Can you show what result you are expecting there ? thx


    Regards,
    DILIPandey
    <click on below * if this helps>

  9. #9
    Registered User
    Join Date
    03-15-2013
    Location
    Baltimore
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Formula- count # of guests for every hour based on arrival and end time

    Hello Dilipandey,

    Please see attached with my expected results. Thanks much for your help and time.

    Jocelyn
    Attached Files Attached Files

  10. #10
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Formula- count # of guests for every hour based on arrival and end time

    Okay.. yellow highlighted cells should not be counted as there end time is not covered.. see the attached file.


    Project 3-19-13.xlsx

    Regards,
    DILIPandey
    <click on below * if this helps>

  11. #11
    Registered User
    Join Date
    03-15-2013
    Location
    Baltimore
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Formula- count # of guests for every hour based on arrival and end time

    Hello Dilipandey,

    I think we still need to count them because they were there at the start of the hour (e.g. 24:00 for 0:18).

    On the attached, I used a formula I found from another thread that was able to capture almost all except for the 23:00 and 24:00 (didn't capture all). If you could check what's missing on the formula why it's not capturing everything.

    Thanks for all your help and patience.

    J
    Attached Files Attached Files

  12. #12
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Formula- count # of guests for every hour based on arrival and end time

    Hi J, I am not sure why this formula to column G which is blank.


    Regards,
    DILIPandey
    <click on below * if this helps>

+ 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