+ Reply to Thread
Results 1 to 17 of 17

Time Formula Help

  1. #1
    Registered User
    Join Date
    07-05-2012
    Location
    Massapequa, NY
    MS-Off Ver
    Excel 2010
    Posts
    13

    Time Formula Help

    Hello All -
    I need to calculate any hours between 8:00PM and 6:00AM

    Example:
    Start Time:10:00PM
    End Time:6:30AM
    Answer: 8 hours

    Please help me.

    Thank you.
    Jenny
    Last edited by JennyGP; 12-19-2012 at 03:52 AM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Time Formula Help

    Not sure how you are arriving 6 hours?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    07-05-2012
    Location
    Massapequa, NY
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Time Formula Help

    Sorry - I meant 8 hours
    Thank you.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Time Formula Help

    Try this...

    A1 cell
    10:00 PM

    B1 cell
    6:30 AM

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

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

    Re: Time Formula Help

    Hi JennyGP,

    Still answer would be 8:30 hours as per your example:
    Example:
    Start Time:10:00PM
    End Time:6:30AM
    Answer: 6 hours

    Use below formula:-

    =IF(B2<A2,("24:00:00"-A2)+B2,B2-A2)

    where A2 is start time and B2 is End time

    See attached Time diff.xlsx


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  6. #6
    Registered User
    Join Date
    07-05-2012
    Location
    Massapequa, NY
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Time Formula Help

    Thank you -
    One more question the time format should be as an example 5:00 PM or 17:00? just 5:00
    I actually have the raw data showing one column 5:00 and the other column shows AM or PM

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

    Re: Time Formula Help

    Hi Jenny,

    These all are time formats.. you can format the cell as you want. Select the cell, press ctrl + 1, and choose the required format under Time category

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  8. #8
    Registered User
    Join Date
    07-05-2012
    Location
    Massapequa, NY
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Time Formula Help

    I need to calculate the hours that fall between 8PM and 6 AM so the answer would have to be 8 hours

    Please help

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

    Re: Time Formula Help

    calculate the hours that fall between 8PM and 6 AM so the answer would have to be 8 hours
    as per me.. result should be 10 hours .. please check. thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  10. #10
    Registered User
    Join Date
    07-05-2012
    Location
    Massapequa, NY
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Time Formula Help

    Hours between 8pm and 6am is total of 10 hours however i am trying to capture the hours within different time periods
    example

    start: 10:00PM
    end: 630AM
    Answer 8 hours

    start: 7:00 PM
    end: 6:30 PM
    ANswer: 11 hours

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

    Re: Time Formula Help

    M confused.. I surrender

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  12. #12
    Registered User
    Join Date
    07-05-2012
    Location
    Massapequa, NY
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Time Formula Help

    Thank you for trying


  13. #13
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Please help - time calculations :(

    If your times are in A1 and B1 try:

    =MOD(B1-A1, 1)

  14. #14
    Registered User
    Join Date
    07-05-2012
    Location
    Massapequa, NY
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Please help - time calculations :(

    IT gives me total hours in a clock in and out period but i only need to count the hours the fall between 8 pm and 6 am

  15. #15
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Please help - time calculations :(

    try this:

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

  16. #16
    Registered User
    Join Date
    07-05-2012
    Location
    Massapequa, NY
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Please help - time calculations :(

    It was almost perfect -
    I must be doing something worng

    When i have start 20:30 and end of 22:30 it is calculating 10 hours and not 2:30 hours

  17. #17
    Registered User
    Join Date
    07-05-2012
    Location
    Massapequa, NY
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Time Formula Help

    SOC.xlsx

    Hope this works -
    I am trying to attach a portion of my data that i need help with.
    TY

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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