+ Reply to Thread
Results 1 to 11 of 11

how many days in each month of date range?

  1. #1
    Registered User
    Join Date
    03-04-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    how many days in each month of date range?

    I'm trying to calculate how many days fall into each month from a date range.

    As example: Date Range: Jan 15, 2013 - April 3, 2013

    I need formula that calculates the total days and fills in how many days per month as shown below:


    15-Jan-13 3-Apr-13

    jan feb mar apr may june july aug sept oct nov dec
    16 28 31 3 0 0 0 0 0 0 0 0

    Can you help me? Thanks!!

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: how many days in each month of date range?

    Hi mrwm,

    what would be the results if your end date is Jan 20, 2014 ?


    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    03-04-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: how many days in each month of date range?

    thanks for your help. I only need to calculate within a date range that will always be within one calendar year Jan - Dec.

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: how many days in each month of date range?

    HI mrwm

    Use below formula:-
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    days in month.xlsx


    Regards,
    DILIPandey
    <click on below * if this helps>

  5. #5
    Registered User
    Join Date
    03-04-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: how many days in each month of date range?

    Awesome, thank you DiliPandey!!

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: how many days in each month of date range?

    You are welcome. . .

    Cheers

    Regards,
    DILIPandey
    <click on below * if this helps>

  7. #7
    Registered User
    Join Date
    03-04-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: how many days in each month of date range?

    DiliPandey,

    I need a bit more help if you don't mind... I have the formula working in the attached if month starts in January, but it is not working if it starts in a month past January. Can you help me fix it?
    Attached Files Attached Files

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: how many days in each month of date range?

    Okay.. see the attached file:-


    new formula.xlsx

    Regards,
    DILIPandey
    <click on below * if this helps>

  9. #9
    Registered User
    Join Date
    03-04-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: how many days in each month of date range?

    Awesome! Thank you so much!!

  10. #10
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: how many days in each month of date range?

    you are welcome...



    Regards,
    DILIPandey
    <click on below * if this helps>

  11. #11
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,800

    Re: how many days in each month of date range?

    You could also use this formula in D2 copied across and down

    =MAX(0,MIN($C2,EOMONTH(D$1,0))+1-MAX($B2+1,D$1))

    if you don't want to see zeroes custom format as

    General;;
    Audere est facere

+ 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