+ Reply to Thread
Results 1 to 3 of 3

Days for each month in a date range

  1. #1
    Registered User
    Join Date
    10-11-2007
    Posts
    2

    Days for each month in a date range

    Hi all,

    I'm looking to get some help on an excel formula. I have the date range 10/20/2007 (A1) through 1/13/2008 (B1). What I want to determine is how many days are there in each month for this date range.

    I can figure out the first month easily:
    =DAYS360(A1,EOMONTH(A1,0),FALSE)+1

    But, after that, it gets a little more tricky... Any help from you would be great. Thanks!

    Goldy

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,702
    Hello goldy,

    I'd do that like this

    List all month start dates in D2 down, e.g. in D2 10/1/2007, in D3 11/1/2007 etc. [you can format these as mmm yy if you wish so that they just display like Oct 07]

    Then in E2 use this formula and copy down

    =MAX(0,MIN(EOMONTH(D2,0)+1,B$1+1)-MAX(A$1,D2))

  3. #3
    Registered User
    Join Date
    10-11-2007
    Posts
    2

    Nice....

    Perfect, thanks daddylonglegs.

+ 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