+ Reply to Thread
Results 1 to 5 of 5

24 hr time calculations without semi colons

Hybrid View

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

    24 hr time calculations without semi colons

    It's a long time since I have used excel and I have after a long illness just got back to an old project. Unfortunately, I have forgotten a lot that I had previously learnt from this forum despite re-reading my previous posts
    I have attached a sample created in excel 2010.
    Row 5 with times entered with the semi colons works just as needed and the calculations in H,J,K,L work OK.
    but the full workbook will need lots of entries so I want to do away with having to put in the time consuming semi colons.
    In row 6,I have entered the times without the semi colons and formatted the cells as 00\:00.
    What my question is, Does anyone know how can I get columns H J K L to do the calculations? in row 6
    Thank You
    Attached Files Attached Files
    Last edited by nje; 08-08-2011 at 02:01 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: 24 hr time calculations without semi colons

    As a starter:

    F6:
    =MOD(TEXT(D6,"00\:00")-TEXT(C6,"00\:00"),1)
    From the above you can see how you can take the non-time values and use in time context ... the MOD is an alternative way of handling times that cross midnight (assumes duration never exceeds 24 hours)

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

    Re: 24 hr time calculations without semi colons

    DonkeyOte
    Thank you for your quick response and your solution, that seems to do the trick but it has left me with another problem, which I did learn how to solve, but it has got a bit too complicated for me this time. I hope you can help with it. I have posted the sample again.
    The calculations now work out nicely thanks, but when I drag the formula down each cell fills with either zeros or the calculation from above, What I want are for the cells to remain blank, but I can't follow my own notes on how to sort it.
    Thanks
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: 24 hr time calculations without semi colons

    As an example

    F6:
    =IF(COUNT($C6:$D6)<2,"",MOD(TEXT($D6,"00\:00")-TEXT($C6,"00\:00"),1))

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

    Re: 24 hr time calculations without semi colons

    Congratulations, you did it.
    Thank you. I don't quite understand the formula, but will try to decipher it.
    Thanks again for your time and expertise.
    I did want to mark this post as 'solved' but I can't remember how to do it
    Last edited by nje; 08-08-2011 at 01:58 PM.

+ 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