+ Reply to Thread
Results 1 to 5 of 5

difference between times not working for after midnight.

  1. #1
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    difference between times not working for after midnight.

    as you can see on the attached form I have a start stop macro built in. my issue is when the time crossed midnight it goes to a negative number. I need this to do the correct math even crossing midnight7400.xlsm

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: difference between times not working for after midnight.

    Can't see anything but i suspect you're using times only when the date is also important to capture the midnight crossover.
    Elegant Simplicity............. Not Always

  3. #3
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: difference between times not working for after midnight.

    so shoud i format the cells to reflect date as well.

  4. #4
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: difference between times not working for after midnight.

    I've checked your workbook and everything seems to be in order calculation wise.

    What you may possibly need to guard against is writing out times which are earlier than In times but for some reason I can't get your macro to run properly so i can't check exactly what it's doing.

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: difference between times not working for after midnight.

    You can use =MOD(endTime+1-StartTime, 1) to allow for non dated entries when the difference will always be less than 24 hr.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

+ 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