+ Reply to Thread
Results 1 to 6 of 6

Calculating elapsed time

  1. #1
    andoh
    Guest

    Calculating elapsed time

    I would like to calculate the elapsed time in hours of 2 cells with the
    format dd/mm/yyyy hh:mm:ss. The two cells represent the start and finish time
    of a job and the elapsed time is 0>x<infinity. Does anybody know how to do
    this?

  2. #2
    Niek Otten
    Guest

    Re: Calculating elapsed time

    =B1-A1, format as [h]:mm or just[h]
    (Format>Cells>Number>Custom)

    --
    Kind regards,

    Niek Otten

    "andoh" <[email protected]> wrote in message
    news:[email protected]...
    >I would like to calculate the elapsed time in hours of 2 cells with the
    > format dd/mm/yyyy hh:mm:ss. The two cells represent the start and finish
    > time
    > of a job and the elapsed time is 0>x<infinity. Does anybody know how to do
    > this?




  3. #3
    andoh
    Guest

    Re: Calculating elapsed time

    Thanks for your reply Niek but this doesn't work or I'm doing something
    wrong. If you notice the cells contain more than just hh:mm and the dates are
    not always the same.

    "Niek Otten" schreef:

    > =B1-A1, format as [h]:mm or just[h]
    > (Format>Cells>Number>Custom)
    >
    > --
    > Kind regards,
    >
    > Niek Otten
    >
    > "andoh" <[email protected]> wrote in message
    > news:[email protected]...
    > >I would like to calculate the elapsed time in hours of 2 cells with the
    > > format dd/mm/yyyy hh:mm:ss. The two cells represent the start and finish
    > > time
    > > of a job and the elapsed time is 0>x<infinity. Does anybody know how to do
    > > this?

    >
    >
    >


  4. #4
    Roger Govier
    Guest

    Re: Calculating elapsed time

    Hi

    Niek's suggestion works absolutely fine.
    Are you sure you are putting the [ ] around the h in the custom format of
    hh:mm?
    It needs to be [hh]:mm not hh:mm.
    The latter will only give the hours difference, as the calculation won't
    roll past 24 hours.

    Whether you use [h] or [hh] won't make any difference other than showing a
    leading zero for number of hours less than 10.

    Regards

    Roger Govier


    andoh wrote:
    > Thanks for your reply Niek but this doesn't work or I'm doing something
    > wrong. If you notice the cells contain more than just hh:mm and the dates are
    > not always the same.
    >
    > "Niek Otten" schreef:
    >
    >
    >>=B1-A1, format as [h]:mm or just[h]
    >>(Format>Cells>Number>Custom)
    >>
    >>--
    >>Kind regards,
    >>
    >>Niek Otten
    >>
    >>"andoh" <[email protected]> wrote in message
    >>news:[email protected]...
    >>
    >>>I would like to calculate the elapsed time in hours of 2 cells with the
    >>>format dd/mm/yyyy hh:mm:ss. The two cells represent the start and finish
    >>>time
    >>>of a job and the elapsed time is 0>x<infinity. Does anybody know how to do
    >>>this?

    >>
    >>
    >>


  5. #5
    andoh
    Guest

    Re: Calculating elapsed time

    Thanks Roger,

    but I can't get it to workMaybe its to do with the format of the A1 & B1.
    The formula in C1 is B1-A1 and I've formatted C1 with both [hh]:mm and [h]:mm
    but neither seem to work. Here is an example of the format of the cells:

    Cell A1: 17/10/2005 10:09:13 Cell B1: 18/10/2005 14:09:11 Cell C1: #VALUE!

    Any tips would be greatly appreciated,
    Regards,
    Andrew O'Hara

    "Roger Govier" schreef:

    > Hi
    >
    > Niek's suggestion works absolutely fine.
    > Are you sure you are putting the [ ] around the h in the custom format of
    > hh:mm?
    > It needs to be [hh]:mm not hh:mm.
    > The latter will only give the hours difference, as the calculation won't
    > roll past 24 hours.
    >
    > Whether you use [h] or [hh] won't make any difference other than showing a
    > leading zero for number of hours less than 10.
    >
    > Regards
    >
    > Roger Govier
    >
    >
    > andoh wrote:
    > > Thanks for your reply Niek but this doesn't work or I'm doing something
    > > wrong. If you notice the cells contain more than just hh:mm and the dates are
    > > not always the same.
    > >
    > > "Niek Otten" schreef:
    > >
    > >
    > >>=B1-A1, format as [h]:mm or just[h]
    > >>(Format>Cells>Number>Custom)
    > >>
    > >>--
    > >>Kind regards,
    > >>
    > >>Niek Otten
    > >>
    > >>"andoh" <[email protected]> wrote in message
    > >>news:[email protected]...
    > >>
    > >>>I would like to calculate the elapsed time in hours of 2 cells with the
    > >>>format dd/mm/yyyy hh:mm:ss. The two cells represent the start and finish
    > >>>time
    > >>>of a job and the elapsed time is 0>x<infinity. Does anybody know how to do
    > >>>this?
    > >>
    > >>
    > >>

    >


  6. #6
    Niek Otten
    Guest

    Re: Calculating elapsed time

    Probably your dates are actually text. You can check with the ISTEXT()
    function.
    If so:
    Format the cells as dd/mm/yyyy h:mm and re-enter the dates and times (F2,
    ENTER)

    --
    Kind regards,

    Niek Otten

    "andoh" <[email protected]> wrote in message
    news:[email protected]...
    > Thanks Roger,
    >
    > but I can't get it to workMaybe its to do with the format of the A1 & B1.
    > The formula in C1 is B1-A1 and I've formatted C1 with both [hh]:mm and
    > [h]:mm
    > but neither seem to work. Here is an example of the format of the cells:
    >
    > Cell A1: 17/10/2005 10:09:13 Cell B1: 18/10/2005 14:09:11 Cell C1: #VALUE!
    >
    > Any tips would be greatly appreciated,
    > Regards,
    > Andrew O'Hara
    >
    > "Roger Govier" schreef:
    >
    >> Hi
    >>
    >> Niek's suggestion works absolutely fine.
    >> Are you sure you are putting the [ ] around the h in the custom format of
    >> hh:mm?
    >> It needs to be [hh]:mm not hh:mm.
    >> The latter will only give the hours difference, as the calculation won't
    >> roll past 24 hours.
    >>
    >> Whether you use [h] or [hh] won't make any difference other than showing
    >> a
    >> leading zero for number of hours less than 10.
    >>
    >> Regards
    >>
    >> Roger Govier
    >>
    >>
    >> andoh wrote:
    >> > Thanks for your reply Niek but this doesn't work or I'm doing something
    >> > wrong. If you notice the cells contain more than just hh:mm and the
    >> > dates are
    >> > not always the same.
    >> >
    >> > "Niek Otten" schreef:
    >> >
    >> >
    >> >>=B1-A1, format as [h]:mm or just[h]
    >> >>(Format>Cells>Number>Custom)
    >> >>
    >> >>--
    >> >>Kind regards,
    >> >>
    >> >>Niek Otten
    >> >>
    >> >>"andoh" <[email protected]> wrote in message
    >> >>news:[email protected]...
    >> >>
    >> >>>I would like to calculate the elapsed time in hours of 2 cells with
    >> >>>the
    >> >>>format dd/mm/yyyy hh:mm:ss. The two cells represent the start and
    >> >>>finish
    >> >>>time
    >> >>>of a job and the elapsed time is 0>x<infinity. Does anybody know how
    >> >>>to do
    >> >>>this?
    >> >>
    >> >>
    >> >>

    >>




+ 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