+ Reply to Thread
Results 1 to 4 of 4

Formula to add network time to leave time not working correctly

  1. #1
    Registered User
    Join Date
    12-13-2013
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2007
    Posts
    2

    Formula to add network time to leave time not working correctly

    Hello,

    I'm looking for a little guidance on what might be causing one of my formulas to not always calculate properly. I've attached an example workbook so you can see what I'm trying to do.

    I'm adding network activity times and leave times together to determine total times per day. In column A of the 'Results by week' worksheet I've highlighted those dates that were holidays for our agency. In column N of that same sheet, I have a formula to check and see if there was a network time found in column G. If so, I wanted to determine if that time was less than or greater than 8 hours. If it was less than 8 hours, I want column N to show 8 hours; if it was more than 8 hours, I wanted the time from column G to be shown in column N. If there was no time found in column G, I wanted column N to show 8 hours.

    The formula seems to be working fine, as long as there aren't any values displayed in columns H, I, or J. When there is time in both column G and H, I, or J, the formula in column N doesn't work right. Instead of showing a time, it seems to be displayed as text (although I have it formatted as a custom time). I need that time to be included in the average hours for the week, which can be seen in column O.

    To be clear, this is only for those dates that are highlighted in column A. Any guidance you can provide on why my formula isn't working correctly in those instances would be greatly appreciated. Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Formula to add network time to leave time not working correctly

    Maybe...

    =IF(AND(G31<TIME(8,0,0),G31=""),TIME(8;0,0),G31)

  3. #3
    Registered User
    Join Date
    12-13-2013
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Formula to add network time to leave time not working correctly

    Thanks for replying, azumi. When I tried the formula you suggested, it doesn't put 8 hours in column N for holidays that weren't worked (e.g., rows 86, 173, and 174). It also only put 4 hours and 2 minutes for row 172, when I need it to put 8 hours. Any other suggestions would be appreciated. Thanks.

    Update:

    Hey, azumi. Your response basically gave me what I needed. All I had to do was change the "AND" in your formula to an "OR" and it seems to work. It now looks like this: =IF(OR(G31<TIME(8,0,0),G31=""),TIME(8;0,0),G31). Thanks again for your help. I appreciate it.
    Last edited by mlm2832; 02-27-2014 at 12:28 AM.

  4. #4
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Formula to add network time to leave time not working correctly

    Glad you have found to solve the problem

    Cheers

+ 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. [SOLVED] Time formula not calculating correctly
    By brianfromla in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-19-2014, 11:12 AM
  2. Addition of Time formula not working correctly
    By JK1234 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-12-2010, 12:01 PM
  3. Run time Error 91 - End Loop not working correctly
    By rowing190 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-05-2009, 05:18 PM
  4. Converting military time to decimal time not rounding correctly
    By Sean Anderson in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-23-2008, 09:12 PM
  5. working time and over time formula needed please
    By Crasher in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 10-09-2006, 08:48 PM

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