+ Reply to Thread
Results 1 to 6 of 6

Need formula for # of days in each month when entry is made on a date range PLS HELP!

  1. #1
    Registered User
    Join Date
    11-08-2006
    Posts
    3

    Need formula for # of days in each month when entry is made on a date range PLS HELP!

    Hello All I need help

    Basically I need to have the formula to reflect the number of days each
    month till the end of a date


    and whenever I enter in a date range each month updates itself with the
    number of days


    For example


    Start Date 9/6/06
    End Date 2/6/07


    Year 2006- Year 2007-
    Jan: Jan:31
    Feb: Feb: 6
    Mar:
    April:
    May:
    June:
    July:
    August:
    September:25 (including start date day)
    October: 31
    November: 30
    December: 31


    Totaling 154 Days


    Im Thinking A2 is start date B2 is End Date
    Then D2 E2 F2 G2 etc shows each number of days..
    Can Someone Help??

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    Enter 1 to 12 from D1 to O1
    Enter the following formula in D2 and copy up to O2
    =SUMPRODUCT(--(MONTH($A$2-1+ROW(INDIRECT("1:"&($B$2-$A$2)+1)))=D1))

    Assumptions:
    Im Thinking A2 is start date B2 is End Date
    Then D2 E2 F2 G2 etc shows each number of days..
    Mangesh

  3. #3
    Registered User
    Join Date
    11-08-2006
    Posts
    3

    Thanks

    Thanks a lot
    Last edited by abomb123; 11-09-2006 at 05:46 PM.

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Quote Originally Posted by abomb123
    Hello All I need help

    Basically I need to have the formula to reflect the number of days each
    month till the end of a date


    and whenever I enter in a date range each month updates itself with the
    number of days


    For example


    Start Date 9/6/06
    End Date 2/6/07


    Year 2006- Year 2007-
    Jan: Jan:31
    Feb: Feb: 6
    Mar:
    April:
    May:
    June:
    July:
    August:
    September:25 (including start date day)
    October: 31
    November: 30
    December: 31


    Totaling 154 Days


    Im Thinking A2 is start date B2 is End Date
    Then D2 E2 F2 G2 etc shows each number of days..
    Can Someone Help??
    Hi abomb123,

    Attached is a solution to your question

    oldchippy
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-08-2006
    Posts
    3

    Many Thanks

    you have made my job a lot easier .. thank you thank you thank you!!!

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Glad to help, thanks for the feedback

+ 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