+ Reply to Thread
Results 1 to 7 of 7

calculating time in 24hr clock with added conditions

Hybrid View

  1. #1
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699

    Re: calculating time in 24hr clock with added conditions

    I think Zbor's suggestion should be like this

    =IF(J7="","",IF(OR(G7="P1",G7="PIC"),MOD(K7-J7,1),""))

    That assumes you have times in J7 and K7. If you want to type in just 2350 and 0700 without the colons then format as you suggested and use this version

    =IF(J7="","",IF(OR(G7="P1",G7="PIC"),MOD(TEXT(K7,"00\:00")-TEXT(J7,"00\:00"),1),""))

    to input the times you can omit leading zeroes so for 07:00 AM you can just input 700
    Audere est facere

  2. #2
    Valued Forum Contributor
    Join Date
    06-23-2010
    Location
    North West
    MS-Off Ver
    office 2010
    Posts
    355

    Re: calculating time in 24hr clock with added conditions

    Daddylonglegs - Thank you very much. It all works, I'm goig to use the the 24 hour clock without the colons as it seems to perform perfectly. I really appreciate your help. Can you foresee any problems using the the 24 hour clock this way, all I ever want it to do is just add to up, it isn't restricted to a certain number is it? as it might eventually have to count over a 1000 hours or more. I have checked your formula against ZBOR and the only difference that I could see was a space between the comma and the word MOD
    Last edited by nje; 07-25-2010 at 02:44 PM.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699

    Re: calculating time in 24hr clock with added conditions

    What will be over 1000 hours? If you are summing columns L or M to get those sums then that won't be a problem - those result columns will still be in "real time" format.

  4. #4
    Valued Forum Contributor
    Join Date
    06-23-2010
    Location
    North West
    MS-Off Ver
    office 2010
    Posts
    355

    Re: calculating time in 24hr clock with added conditions

    Daddylonglegs - Thanks, the columns to be added are L & M and it would be those (including the grand total) that may go up to or over a 1000.

+ 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