+ Reply to Thread
Results 1 to 4 of 4

calculate hours on work sheet

  1. #1
    monish74
    Guest

    calculate hours on work sheet

    I am trying to calculate hours on a work schedual with 1 cell hours worked
    like 8:15am-4:15pm and the cell under it reads 8 hours as the answer

    probably simple but i'm lost

  2. #2
    Steve
    Guest

    Re: calculate hours on work sheet

    Monish

    I don't see the problem from your question.
    I have 8:15am in A1 and 4:15pm in B1

    B1-A1 produce a row of #'s (as it should)
    A1-B1 produces your result.

    The following is based on the assumption you are actually trying to
    calculate across midnight:

    To calculate time across midnight, you need to enter the number of days into
    the equation:
    =IF(B1-A1>=0,B1-A1,NumberOfDays+B1-A1)
    If you are totally sure nothing will be scheduled more than 24 hours:
    =IF(B1-A1>=0,B1-A1,1+B1-A1)

    Use a custom formation on the cells containing the result [h]:mm if time is
    expected to extend more than 24 hours.

    HTH
    Steve




    "monish74" <[email protected]> wrote in message
    news:[email protected]...
    >I am trying to calculate hours on a work schedual with 1 cell hours worked
    > like 8:15am-4:15pm and the cell under it reads 8 hours as the answer
    >
    > probably simple but i'm lost




  3. #3
    Registered User
    Join Date
    02-11-2005
    Posts
    85
    I don't know of a way to do that from one cell but if you split the times into two cells this should work:

    CELL-A2 (10:35 AM )
    CELL-B2 ( 3:30 PM )
    Formula Description
    =TEXT(B2-A2,"h") Hours between two times (4)
    =TEXT(B2-A2,"h:mm") Hours and minutes between two times (4:55)
    =TEXT(B2-A2,"h:mm:ss") Hours and seconds between two times (4:55:00)


    Note You can also apply the time and date number format without using the TEXT function to specify the format. However, if you use both a format applied with the TEXT function and number format, the TEXT function takes precedence.

  4. #4
    Biff
    Guest

    Re: calculate hours on work sheet

    >I don't see the problem from your question.

    I think they have 8:15am-4:15pm all in a single cell.

    Biff

    >-----Original Message-----
    >Monish
    >
    >I don't see the problem from your question.
    >I have 8:15am in A1 and 4:15pm in B1
    >
    >B1-A1 produce a row of #'s (as it should)
    >A1-B1 produces your result.
    >
    >The following is based on the assumption you are actually

    trying to
    >calculate across midnight:
    >
    >To calculate time across midnight, you need to enter the

    number of days into
    >the equation:
    >=IF(B1-A1>=0,B1-A1,NumberOfDays+B1-A1)
    >If you are totally sure nothing will be scheduled more

    than 24 hours:
    >=IF(B1-A1>=0,B1-A1,1+B1-A1)
    >
    >Use a custom formation on the cells containing the result

    [h]:mm if time is
    >expected to extend more than 24 hours.
    >
    >HTH
    >Steve
    >
    >
    >
    >
    >"monish74" <[email protected]> wrote in

    message
    >news:[email protected]...
    >>I am trying to calculate hours on a work schedual with 1

    cell hours worked
    >> like 8:15am-4:15pm and the cell under it reads 8 hours

    as the answer
    >>
    >> probably simple but i'm lost

    >
    >
    >.
    >


+ 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