+ Reply to Thread
Results 1 to 11 of 11

EOMONTH formula calculation only work days

  1. #1
    Registered User
    Join Date
    02-04-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    12

    Post EOMONTH formula calculation only work days

    Using the following formula: =MAX(0,MIN(EOMONTH(E$19,0),$B24)-MAX(E$19,$A24)+1)

    I can calculate between a start and end date but gives me the days of each month.

    Start Date End Date Jan Feb Mar Apr May
    1/31/14 2/11/14 1 11 0 0 0
    2/17/14 2/19/14 0 3 0 0 0
    3/14/14 5/9/14 0 0 18 30 9

    I actually just want to calculate the week days or work days. At the moment it is calculating all the days in that month.

  2. #2
    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: EOMONTH formula calculation only work days

    See this.

    http://www.excelforum.com/excel-form...ml#post3718691
    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.

  3. #3
    Registered User
    Join Date
    02-04-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: EOMONTH formula calculation only work days

    Top chart uses this formula: =IF(AND(D$1>=$A2,D$1<=$B2),NETWORKDAYS(D$1,EOMONTH(D$1,0)),"")

    Bottom chart is hand calculated but I need a formula that calculates that.



    Start Date End Date Jan-2014 Feb-2014 Mar-2014 Apr-2014 May-2014 Jun-2014 Jul-2014 Aug-2014 Sep-2014 Oct-2014 Nov-2014 Dec-2014
    1/31/2014 2/11/2014 20
    2/17/2014 2/19/2014
    3/14/2014 5/9/2014 22 22


    Start Date End Date Jan-2014 Feb-2014 Mar-2014 Apr-2014 May-2014 Jun-2014 Jul-2014 Aug-2014 Sep-2014 Oct-2014 Nov-2014 Dec-2014
    1/31/2014 2/11/2014 1 7 0 0 0 0 0 0 0 0 0 0
    2/17/2014 2/19/2014 0 3 0 0 0 0 0 0 0 0 0 0
    3/14/2014 5/9/2014 0 0 8 22 7 0 0 0 0 0 0 0

  4. #4
    Registered User
    Join Date
    02-04-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: EOMONTH formula calculation only work days

    Capture.PNG

    I am sorry, this image should be more clear on what I was trying to display

  5. #5
    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: EOMONTH formula calculation only work days

    Even better will be an example workbook(which i'll see tomorrow morning(it's 19:30 here!)

  6. #6
    Registered User
    Join Date
    02-04-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: EOMONTH formula calculation only work days

    Attached is the work book

    Sheet 1 is the image I had sent with the formula that I got form the other forum

    LDW tab is what I am currently working on. I need all of these number to make bar graphs to show trends and such.

    Thank you for the help!
    Attached Files Attached Files

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: EOMONTH formula calculation only work days

    In D2 and copy across and down,

    =MAX(0, NETWORKDAYS(MAX($A2, D$1), MIN($B2, EOMONTH(D$1, 0))))

    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    Start Date
    End Date
    Jan-2014
    Feb-2014
    Mar-2014
    Apr-2014
    May-2014
    Jun-2014
    2
    01/31/2014
    02/11/2014
    1
    7
    0
    0
    0
    0
    3
    02/17/2014
    02/19/2014
    0
    3
    0
    0
    0
    0
    4
    03/14/2014
    05/09/2014
    0
    0
    12
    22
    7
    0
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Registered User
    Join Date
    02-04-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: EOMONTH formula calculation only work days

    WONDERFUL!!!! thank you so much! this is exactly what I needed!!!

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: EOMONTH formula calculation only work days

    You're welcome.

    There are various other allocation formulas in the workbook at https://app.box.com/shared/7xm2kt408n

  10. #10
    Registered User
    Join Date
    02-04-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: EOMONTH formula calculation only work days

    One last question, if I do not have dates entered how do I have the formula read it as 0?

    I am getting back ridiculous numbers when no dates are entered

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: EOMONTH formula calculation only work days

    =if(count($a2:$b2) < 2, "", MAX(0, NETWORKDAYS(MAX($A2, D$1), MIN($B2, EOMONTH(D$1, 0)))))

+ 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. Help with a formula please - rolling calculation of 365 days
    By Matty_B in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-21-2013, 05:15 AM
  2. Replies: 1
    Last Post: 02-28-2012, 02:55 AM
  3. Date Calculation of work days
    By Dnyan in forum Excel General
    Replies: 11
    Last Post: 09-22-2011, 06:25 AM
  4. Replies: 12
    Last Post: 07-25-2007, 11:34 AM
  5. [SOLVED] Formula using work days
    By trouble with work days in forum Excel General
    Replies: 2
    Last Post: 01-17-2006, 12:55 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