+ Reply to Thread
Results 1 to 5 of 5

how do I calculate hours using one cell only

  1. #1
    Alan
    Guest

    Re: how do I calculate hours using one cell only

    I don't think you can do it in one cell, or at least, not easily. However
    with the start time in one cell and the end time in another its just simple
    subtraction, subtract the start time from the end time. It gets more
    complicated though if the start time is say 22:00 and the end time is 06:00
    the next morning so the shift spans two days
    Regards,
    Alan.
    "James Fullmer" <James [email protected]> wrote in message
    news:[email protected]...
    >I am trying to create a schedule that calculates hours worked in a day. I
    > have several restrictions in space, so would like to have one cell that
    > shows
    > start and end time, and a second cell that shows hours worked.
    >
    > For instance
    > A1 10:00 AM - 5:00 PM
    > B1 8
    >
    > I am basically looking for the formula to put in B1




  2. #2
    Biff
    Guest

    Re: how do I calculate hours using one cell only

    Hi!

    See which method you might prefer:

    A1 = 10:00 AM
    B1 = 5:00 PM
    C1 = formula:

    =(B1-A1+(B1<A1))*24

    OR......

    A1 = 10:00 AM - 5:00 PM
    B1 = formula:

    =((SUBSTITUTE(A1,LEFT(A1,FIND("-",A1)+1),"")*1-SUBSTITUTE(A1,RIGHT(A1,FIND("-",A1)-1),"")*1)+(SUBSTITUTE(A1,LEFT(A1,FIND("-",A1)+1),"")*1<SUBSTITUTE(A1,RIGHT(A1,FIND("-",A1)-1),"")*1))*24

    Seems like a no brainer to me! <g>

    Biff

    "James Fullmer" <James [email protected]> wrote in message
    news:[email protected]...
    >I am trying to create a schedule that calculates hours worked in a day. I
    > have several restrictions in space, so would like to have one cell that
    > shows
    > start and end time, and a second cell that shows hours worked.
    >
    > For instance
    > A1 10:00 AM - 5:00 PM
    > B1 8
    >
    > I am basically looking for the formula to put in B1




  3. #3
    James Fullmer
    Guest

    how do I calculate hours using one cell only

    I am trying to create a schedule that calculates hours worked in a day. I
    have several restrictions in space, so would like to have one cell that shows
    start and end time, and a second cell that shows hours worked.

    For instance
    A1 10:00 AM - 5:00 PM
    B1 8

    I am basically looking for the formula to put in B1

  4. #4
    Alan
    Guest

    Re: how do I calculate hours using one cell only

    I don't think you can do it in one cell, or at least, not easily. However
    with the start time in one cell and the end time in another its just simple
    subtraction, subtract the start time from the end time. It gets more
    complicated though if the start time is say 22:00 and the end time is 06:00
    the next morning so the shift spans two days
    Regards,
    Alan.
    "James Fullmer" <James [email protected]> wrote in message
    news:[email protected]...
    >I am trying to create a schedule that calculates hours worked in a day. I
    > have several restrictions in space, so would like to have one cell that
    > shows
    > start and end time, and a second cell that shows hours worked.
    >
    > For instance
    > A1 10:00 AM - 5:00 PM
    > B1 8
    >
    > I am basically looking for the formula to put in B1




  5. #5
    Biff
    Guest

    Re: how do I calculate hours using one cell only

    Hi!

    See which method you might prefer:

    A1 = 10:00 AM
    B1 = 5:00 PM
    C1 = formula:

    =(B1-A1+(B1<A1))*24

    OR......

    A1 = 10:00 AM - 5:00 PM
    B1 = formula:

    =((SUBSTITUTE(A1,LEFT(A1,FIND("-",A1)+1),"")*1-SUBSTITUTE(A1,RIGHT(A1,FIND("-",A1)-1),"")*1)+(SUBSTITUTE(A1,LEFT(A1,FIND("-",A1)+1),"")*1<SUBSTITUTE(A1,RIGHT(A1,FIND("-",A1)-1),"")*1))*24

    Seems like a no brainer to me! <g>

    Biff

    "James Fullmer" <James [email protected]> wrote in message
    news:[email protected]...
    >I am trying to create a schedule that calculates hours worked in a day. I
    > have several restrictions in space, so would like to have one cell that
    > shows
    > start and end time, and a second cell that shows hours worked.
    >
    > For instance
    > A1 10:00 AM - 5:00 PM
    > B1 8
    >
    > I am basically looking for the formula to put in B1




+ 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