+ Reply to Thread
Results 1 to 4 of 4

=Networkhours type formula problem

Hybrid View

Gappy =Networkhours type formula... 09-08-2015, 11:35 PM
protonLeah Re: =Networkhours type... 09-09-2015, 01:27 AM
David A Coop Re: =Networkhours type... 09-09-2015, 01:44 AM
David A Coop Re: =Networkhours type... 09-10-2015, 01:07 AM
  1. #1
    Registered User
    Join Date
    06-11-2015
    Location
    New Zealand
    MS-Off Ver
    2010
    Posts
    14

    =Networkhours type formula problem

    Hello,

    I am doing KPI's for my company and need to calculate the number of work hours between 2 date time entries.
    I have had a search and found this formula:

    =(NETWORKDAYS(M40,N40)-1)*("17:00"-"08:00")+MOD(M40,1)-MOD(N40,1)

    However this returns a negative value


    This is how I get the dates:

    1/08/2015 12:45 - 2/08/2015 12:27

    Work hours are 8 - 5 so It should return 8.7
    if it is possible to exclude weekends this is great but no biggie if you can't.

    Thanks for the help

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

    Re: =Networkhours type formula problem

    Is that date range all in one cell?
    (How to) Attach a Workbook
    (please do not post pictures or links to worksheets)
    • Click Advanced (next to quick post),
    • Scroll down until you see "Manage Attachments",
    • Click that then select "add files" (top right corner).
    • Click "Select Files" find your file, click "open" click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Click "Done" at bottom right to close the Attachment Manager.
    • Click "Submit Reply"
    Last edited by protonLeah; 09-09-2015 at 01:34 PM.
    Ben Van Johnson

  3. #3
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: =Networkhours type formula problem

    A small change to the formula should do it.

    =((NETWORKDAYS(M40,N40)-1)*("17:00"-"08:00")+MOD(M40,1)-MOD(N40,1))*-24

    I hope this helps, please let me know!

    Regards,

    David


    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".


  4. #4
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: =Networkhours type formula problem

    Quote Originally Posted by David A Coop View Post
    A small change to the formula should do it.

    =((NETWORKDAYS(M40,N40)-1)*("17:00"-"08:00")+MOD(M40,1)-MOD(N40,1))*-24

    I hope this helps, please let me know!

    Regards,

    David


    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".

    Hello Gappy,

    Did you receive this? For some reason FlameRetired picked it up, and they were not even in the thread!

    DAC

+ 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. SUMIFS Problem - A value used in the formula is of the wrong data type
    By TicklyTigger in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-09-2014, 10:48 AM
  2. Replies: 6
    Last Post: 05-28-2013, 05:08 PM
  3. Replies: 2
    Last Post: 04-24-2013, 01:36 PM
  4. Replies: 1
    Last Post: 08-08-2012, 02:39 PM
  5. Type mismatch problem
    By bernie1961 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-13-2008, 01:20 PM
  6. Lookup type problem
    By chinkygogo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2007, 05:49 AM
  7. ERROR.TYPE formula problem
    By tuph in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-24-2006, 09:10 PM
  8. Type Mismatch Problem
    By Damien McBain in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2005, 12:06 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