+ Reply to Thread
Results 1 to 10 of 10

Days between two cells in business days

  1. #1
    Registered User
    Join Date
    01-08-2018
    Location
    Seattle, US
    MS-Off Ver
    Google Sheet
    Posts
    4

    Days between two cells in business days

    Hello,

    I'm having trouble with counting different two cells in business days.

    For example:
    A1(10/1/2017 8:23AM) B1(10/1/2017 1:52PM)

    If I do =NETWORKDAYS(A1,B1), it will return as "1" but what I really want is the decimal point as technically it was completed less than 1 business day.

    Any help would be much appreciated.

    Thank you,

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Days between two cells in business days

    What are the normal working hours on each day?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    01-08-2018
    Location
    Seattle, US
    MS-Off Ver
    Google Sheet
    Posts
    4

    Re: Days between two cells in business days

    8 hours. Is working hours the only way to accomplish this?

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Days between two cells in business days

    Quote Originally Posted by thomashur87 View Post
    A1(10/1/2017 8:23AM) B1(10/1/2017 1:52PM)
    Is this a valid example, 1st October 2017 was a Sunday (or is it 10th January?) What are your working days? Will start and end times always be within working hours?
    Audere est facere

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Days between two cells in business days

    I should have asked... What are the normal hours... 9 to 5 or what?

  6. #6
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Days between two cells in business days

    Well you need a base unit to present your result in. In other words if we went by your title "Days between two cells in business days" then you are doing exactly what you should, as your base unit is days. What you really are asking for is related to time (not days), so we need to decide how you represent that. Is it hours between only working days, working hours between working days, etc.

    A sample file showing what you have with formula and a page or cell with what you want it to display (calculated manually) would help us help you. As much background and explanation as you can will also make it faster for us to help.
    Ways to get help: Post clear questions, explain your overall goal, supply as much background as possible, respond to questions asked of you by those trying to help and post sample(s) files.

    "I am here to help, not do it for people" -Me

  7. #7
    Registered User
    Join Date
    01-08-2018
    Location
    Seattle, US
    MS-Off Ver
    Google Sheet
    Posts
    4

    Re: Days between two cells in business days

    Start date might not always be a working day, but the end date will always be.

    For reference: https://docs.google.com/spreadsheets...it?usp=sharing

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Days between two cells in business days

    1. Starting time of normal working day?
    2. Finishing time f normal working day?
    3. Total hours between A1 and B1?? Or working hours between A1 and B1?

    And finally, is this for Google sheets or Excel (you did not post in the "other platforms" section, but show Google sheets in your profile)?

  9. #9
    Registered User
    Join Date
    01-08-2018
    Location
    Seattle, US
    MS-Off Ver
    Google Sheet
    Posts
    4

    Re: Days between two cells in business days

    Hi Glenn,

    Thank you for trying to help out.

    It might be tricker than I imagined, since everyone works different hours.. I was hoping to simply show the decimal point between the two cells.

    This is for Google Sheets, and it's actually my first time here - so I did not know to post somewhere else.

    I will just try to find another way.. thank you all of guys for the help.

  10. #10
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Days between two cells in business days

    Assuming working day is 09:00 to 17:00 try this formula in C1 copied down

    =NETWORKDAYS(A1,B1)-1+(MEDIAN(MOD(B1,1),"17:00","9:00")-MEDIAN(NETWORKDAYS(A1,A1)*MOD(A1,1),"9:00","17:00"))/("17:00"-"9:00")

    Adjust day start and end times as required

    This works in Excel and google sheets
    Last edited by daddylonglegs; 01-08-2018 at 03:15 PM.

+ 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. Replies: 1
    Last Post: 09-25-2016, 06:18 PM
  2. First & Last Business Days of Month with Public Holidays and Non-work days
    By shaspos60 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 03-31-2016, 07:05 PM
  3. Replies: 4
    Last Post: 05-19-2014, 04:28 PM
  4. calculate business days(where there is 6 days a week)
    By arnab0711 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-09-2011, 10:09 AM
  5. Changing 24hr days into 7.5 business days
    By jaywizz in forum Excel General
    Replies: 2
    Last Post: 10-18-2010, 05:43 AM
  6. How to calculate # days between business days
    By Susan Hayes in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-07-2005, 11:05 PM
  7. [SOLVED] Macro to highlight cells that are 5 business days from trade date
    By Jason via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-09-2005, 04:06 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