+ Reply to Thread
Results 1 to 11 of 11

Count net working days

  1. #1
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Count net working days

    Dear Friends,
    In my file I want to count the total working days of the month of May 2013. There are 31 days in May and 4 sundays and 1 bank holiday that means total 5 holidays. 31-5 = 26. That means there are 26 working days in May but my formula shows 23 working days which is wrong. I don't have a 5 days week.
    How can I get the correct answer 26 with a formula because manually it's not possible every time.
    Solution please!
    Thanking you in anticipation.

    Mukesh
    Attached Files Attached Files

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Count net working days

    Hi mukeshbaviskar

    Are you using Excel 2007 as per your profile! If you are using 2010 look at the NETWORKDAYS.INTL
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  3. #3
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Count net working days

    Hello Kevin,
    Nice to see you again. I'm using m. s. office 2007 and I want to solve my problem with it only. I don't have m. s. office 2010.
    Waiting for solution.
    Thanking you in anticipation.

    Mukesh

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count net working days

    One way..

    =(B2+1-A2)-COUNTIF(G1:G10,">0")

    Format as general.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Forum Contributor
    Join Date
    09-11-2009
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    102

    Re: Count net working days

    Hi,
    See attached file of another way!
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Count net working days

    Hello Fotis1991,
    Thank you it's working fine but if you know I would like to know the logic behind networkdays function please.
    Ok, Thank you for solution.

    Mukesh

  7. #7
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Count net working days

    Hello duanzhuanming,
    Thank you. In your formula if the list of holidays increases then the result is wrong. How to add the list of holidays range to the formula? The formla sounds little difficult to understand.
    Thank you.

    Mukesh

  8. #8
    Forum Contributor
    Join Date
    09-11-2009
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    102

    Re: Count net working days

    Quote Originally Posted by mukeshbaviskar View Post
    Hello duanzhuanming,
    Thank you. In your formula if the list of holidays increases then the result is wrong. How to add the list of holidays range to the formula? The formla sounds little difficult to understand.
    Thank you.

    Mukesh
    Hi,
    if list of holidays increases, you must change holidays data region. in that formula: only a holiday-->G1
    =NETWORKDAYS(A2,B2,G1)+IF(WEEKDAY(B2)=7,WEEKNUM(B2)+1,WEEKNUM(B2))-WEEKNUM(A2)
    eg. holidays data region: G1:G9----> formula:
    =NETWORKDAYS(A2,B2,G1:G9)+IF(WEEKDAY(B2)=7,WEEKNUM(B2)+1,WEEKNUM(B2))-WEEKNUM(A2)
    with my formula, you can calculate nos of days working between two dates ( eg 1/5/2013->15/5/2013)....

  9. #9
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Count net working days

    Hello duanzhuanming,
    Thank you. Now it's working fine. It's a very tricky formula.
    Now my problem is solved.
    Thank you.

    Mukesh

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

    Re: Count net working days

    This formula will give you the number of working days between any two dates...

    =NETWORKDAYS(A2,B2,holidays)+INT((WEEKDAY(A2)+B2-A2)/7)

    .....but like duanzhuanming's suggestion that won't cope with any Saturday holidays, to do that use this version

    =SUMPRODUCT((WEEKDAY(ROW(INDIRECT(A2&":"&B2)))>1)*(COUNTIF(holidays,ROW(INDIRECT(A2&":"&B2)))=0))

    where holidays is a range containing holiday dates
    Audere est facere

  11. #11
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Count net working days

    Good morning daddylonglegs,
    Thank you for formulas. It's a good collection of network days. It's working fine.
    Thank you.

    Mukesh

+ 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