+ Reply to Thread
Results 1 to 6 of 6

Had to add date to userform now not working????Trying to get total hours

  1. #1
    Registered User
    Join Date
    05-27-2014
    Posts
    5

    Had to add date to userform now not working????Trying to get total hours

    Trying to caculate hours but messes up when I go past midnight for 3rd shift. I added text box for dates begin and end but I have messed it up. Please help get userform working...
    thanks
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,620

    Re: Had to add date to userform now not working????Trying to get total hours

    sorry, mis-read prob.
    Last edited by protonLeah; 06-12-2014 at 10:11 PM.
    Ben Van Johnson

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Had to add date to userform now not working????Trying to get total hours

    Hello janusik4341,

    The attached workbook has been modified and appears to work correctly. Take a look and let me know if anything needs changed.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    05-27-2014
    Posts
    5

    Re: Had to add date to userform now not working????Trying to get total hours

    Thanks for all your work. Its awesome.

  5. #5
    Registered User
    Join Date
    05-27-2014
    Posts
    5

    Re: Had to add date to userform now not working????Trying to get total hours

    The total hours is coming out negative? When going past midnight not sure where to look in program?

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Had to add date to userform now not working????Trying to get total hours

    Hello janusik4341,

    Here is the updated workbook to handle the shift change across midnight.

    The formula change is this this: FX(0) = "=IF(INT(RC[-2])=INT(RC[-5]),(RC[-2]-INT(RC[-2])-(RC[-5]-INT(RC[-5])))*24,((RC[-2]-INT(RC[-2])-(RC[-5]-INT(RC[-5])))*24)+24)"
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Total Working Hours Minus Break + Lunch Times
    By Rosco88 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-13-2013, 05:01 AM
  2. Problem in sumation of total working hours
    By karan.sid.13 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-06-2013, 02:56 AM
  3. Working with time in hours; how can i get a negative or total value?
    By smithjon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-22-2013, 04:38 PM
  4. how to get total working hours
    By ALME in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-18-2013, 01:51 AM
  5. Replies: 3
    Last Post: 02-24-2012, 12:30 PM

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