+ Reply to Thread
Results 1 to 8 of 8

Calculating time difference in minutes

  1. #1
    Registered User
    Join Date
    06-13-2006
    Posts
    45

    Calculating time difference in minutes

    This should be easy, but I'm missing something. We have a deadline of 9:05. The actual time was 9:12. so I have 9:05 in cell B6 and I have 9:12 in cell C6. In D6 I want to show that we were 7 minutes late...preferably that would show -7.

    If I use the formula in D6 =MINUTE(c6-b6) The result is 7. Ideally I would like fo that to be -7.

    If we were actually ahead of deadline, say 9:00 a.m. the formula returns #NUM! and I would like to show a positive number.

    What am I doing wrong? Thanks for any help.

  2. #2
    Scoops
    Guest

    Re: Calculating time difference in minutes


    jonhunt wrote:

    > This should be easy, but I'm missing something. We have a deadline of
    > 9:05. The actual time was 9:12. so I have 9:05 in cell B6 and I have
    > 9:12 in cell C6. In D6 I want to show that we were 7 minutes
    > late...preferably that would show -7.
    >
    > If I use the formula in D6 =MINUTE(c6-b6) The result is 7. Ideally I
    > would like fo that to be -7.
    >
    > If we were actually ahead of deadline, say 9:00 a.m. the formula
    > returns #NUM! and I would like to show a positive number.


    Hi jonhunt

    To eliminate the #NUM! error:

    Tools > Options > Calculation check 1904 date system.

    Note that this will change any dates that already exist in your sheet
    and you will need to amend them.

    It's your sheet but if something is late, isn't it at "zero hour
    +minutes" rather than zero hour -minutes"?

    Regards

    Steve


  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Use this formula in D6

    =(B6-C6)*1440

  4. #4
    Registered User
    Join Date
    06-13-2006
    Posts
    45

    Thanks, but still get error

    Scoops,

    You are right about the plus minutes.

    I changed to the 1904, but I still get the num error when we are early rather than late.

    I had already tried the other suggestion of 1440 and that doesn't seem to work.

    I really didn't understand your comment "Note that this will change any dates that already exist in your sheet
    and you will need to amend them." What will I need to amend?

    Thanks,

    Jon

  5. #5
    David Biddulph
    Guest

    Re: Calculating time difference in minutes

    "jonhunt" <[email protected]> wrote in
    message news:[email protected]...
    >
    > This should be easy, but I'm missing something. We have a deadline of
    > 9:05. The actual time was 9:12. so I have 9:05 in cell B6 and I have
    > 9:12 in cell C6. In D6 I want to show that we were 7 minutes
    > late...preferably that would show -7.
    >
    > If I use the formula in D6 =MINUTE(c6-b6) The result is 7. Ideally I
    > would like fo that to be -7.
    >
    > If we were actually ahead of deadline, say 9:00 a.m. the formula
    > returns #NUM! and I would like to show a positive number.


    If you use the formula =24*60*(B6-C6) you'll get the -7 and +5 answers that
    you want. [Format the result as General, not as a Time, as the answer is
    the number of minutes.]
    --
    David Biddulph



  6. #6
    Registered User
    Join Date
    06-13-2006
    Posts
    45

    Great

    Perfect. Thanks.

  7. #7
    Scoops
    Guest

    Re: Calculating time difference in minutes


    jonhunt wrote:

    > Scoops,
    >
    > You are right about the plus minutes.
    >
    > I changed to the 1904, but I still get the num error when we are early
    > rather than late.
    >
    > I had already tried the other suggestion of 1440 and that doesn't seem
    > to work.
    >
    > I really didn't understand your comment "Note that this will change any
    > dates that already exist in your sheet
    > and you will need to amend them." What will I need to amend?


    Hi Jon

    Not sure why your sheet isn't performing, if I toggle the 1904 date
    system, I get the right answer or a cell full of #.

    As for the amendments - try typing a date into Excel under the default
    1900 and then use 1904. You should see the date shift by 1462 days so,
    to see it as it was before the change you'd amend it by the same (i.e.
    thedate-1462). Any new dates can be entered "as is".

    Regards

    Steve


  8. #8
    Scoops
    Guest

    Re: Calculating time difference in minutes


    jonhunt wrote:

    > Scoops,


    > I had already tried the other suggestion of 1440 and that doesn't seem
    > to work.


    Hi Jon

    Both David's and daddylonglegs solutions work fine for me, though I did
    amend them to
    =24*60*-(B6-C6)
    and
    =(B6-C6)*-1440
    to change the +/-

    Is your data ok?

    Regards

    Steve


+ 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