+ Reply to Thread
Results 1 to 1 of 1

Excel Macro - Date/Time functions - Overtime Calculator

Hybrid View

  1. #1
    Registered User
    Join Date
    12-11-2008
    Location
    Skei's Haven, Krynn.
    Posts
    2

    Question Excel Macro - Date/Time functions - Overtime Calculator

    What I'm trying to do is calculate for overtime.

    Cells D12 and c12 contain times.

    C12 = 8:00 AM
    D12 = 5:45 PM

    
    =(MINUTE(D12-C12) / 60)
    Works as expected. Returns 0.75

    
    =IF(NOT(D12 = ""),IF(D12-C12=0,"",(HOUR(D12-C12) & "." & MINUTE(D12 - C12) )- 1),"")
    Works almost as expected. Returns 8.45

    
    =IF(NOT(D12 = ""),IF(D12-C12=0,"",(HOUR(D12-C12) & "." & (MINUTE(D12 - C12)/60) )- 1),"")
    Fails with #VALUE

    What am I doing wrong?
    Last edited by Blue_Drache; 12-12-2008 at 02:17 PM. Reason: Figured it out.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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