+ Reply to Thread
Results 1 to 3 of 3

24 time format and calculations

  1. #1

    24 time format and calculations

    I have a spreadsheet with start and end times for people's working day,
    in 24 hour format. So it will be 830, 900, 1030, 715 etc in the start
    column and 1700, 1715, 1550 etc in the end column. I would like to do
    a calculation on these times to work out for each person how many hours
    are in their working day (including lunch and breaks). At the moment
    Excel regards these as regular numbers, so I cannot do a calculation
    like 1700-830 because it won't come out right. I have tried fiddling
    with the cell format with no success. How do I do it?


  2. #2
    Bob Phillips
    Guest

    Re: 24 time format and calculations

    =TEXT(B1,"00\:00")-TEXT(A1,"00\:00")

    and format as time

    --

    HTH

    Bob Phillips

    (remove nothere from the email address if mailing direct)

    <[email protected]> wrote in message
    news:[email protected]...
    > I have a spreadsheet with start and end times for people's working day,
    > in 24 hour format. So it will be 830, 900, 1030, 715 etc in the start
    > column and 1700, 1715, 1550 etc in the end column. I would like to do
    > a calculation on these times to work out for each person how many hours
    > are in their working day (including lunch and breaks). At the moment
    > Excel regards these as regular numbers, so I cannot do a calculation
    > like 1700-830 because it won't come out right. I have tried fiddling
    > with the cell format with no success. How do I do it?
    >




  3. #3
    Harlan Grove
    Guest

    Re: 24 time format and calculations

    [email protected] wrote...
    >I have a spreadsheet with start and end times for people's working day,
    >in 24 hour format. So it will be 830, 900, 1030, 715 etc in the start
    >column and 1700, 1715, 1550 etc in the end column. I would like to do
    >a calculation on these times to work out for each person how many hours
    >are in their working day (including lunch and breaks). At the moment
    >Excel regards these as regular numbers, so I cannot do a calculation
    >like 1700-830 because it won't come out right. I have tried fiddling
    >with the cell format with no success. How do I do it?


    First, cell format has **NOTHING** to do with cell contents or values.
    Formulas *ONLY* use the values of other cells. So no formatting you
    apply in any cell would affect formulas in other cells except for
    formulas involving CELL("Format",.).

    You have to change the values in formulas in other cells. If start time
    were in B3 and end time in C3, both as numbers in 0000 format, then use
    either of the following:

    =TEXT(TEXT(C3,"00\:00")-TEXT(B3,"00\:00"),"[h]mm")

    which returns a text result also in 24 hour format, or

    =ROUNDDOWN(C3-B3,-2)+MOD(MOD(C3,100)-MOD(B3,100),60)

    which returns a numeric result also in 24 hour format.


+ 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