Results 1 to 9 of 9

Difference between initial time and final time code not working correcly!

Threaded View

  1. #1
    Forum Contributor
    Join Date
    05-02-2013
    Location
    Indiana
    MS-Off Ver
    Excel 2016
    Posts
    190

    Difference between initial time and final time code not working correcly!

    I am writing VBA code to calculate the difference between initial time and final time. It works until the time span moves to 13 hours. My application is to calculate the difference between two times. I will never have a value that goes over 24hrs. It works when I give it the following values: Initial 6hr, 30min, AM, Final 11hr, 30min, AM. - I get the value 5hr 0min -correct! The following values do not work: Initial 6hr, 30min, AM, Final 7hr, 30min, FM - I should get 13hr, 0min; however it gives me 1hr, 0min -incorrect!
    Anybody have any idea why it is not calculating correctly? Thanks
    redsab
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Calculate time difference based on working hours
    By stanlyj in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-31-2017, 08:39 AM
  2. Find time difference (working hours) on first SwipeIn and last SwipeOut
    By sabha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2015, 03:32 AM
  3. [SOLVED] Formula for working out top X of a date time difference
    By amasson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-25-2014, 04:04 AM
  4. Replies: 1
    Last Post: 09-13-2012, 05:50 AM
  5. Replies: 0
    Last Post: 09-13-2012, 05:28 AM
  6. Time Difference Still Not Working
    By bwhizz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2007, 03:14 PM
  7. Calculating Time difference not working
    By Mindtrap in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-10-2007, 11:17 AM

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