Results 1 to 6 of 6

Please help with counting days within months

Threaded View

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

    Re: Please help with counting days within months

    I think the requirement is to show the number of days in each month, not just the total days, so if you have start date in A2 and end date in B2 (or "Not Yet") and the first of each month listed in D1 across then try this formula in D2 copied across and down

    =MAX(MIN(EOMONTH(D$1,0),IF($B2="Not Yet",TODAY(),$B2)-1)+1-MAX(D$1,$A2),0)

    For "Not Yet" entries the end date used will be today - see attached

    That doesn't count the end date (like hotel stays) so if you want to count that remove the -1, i.e. use

    =MAX(MIN(EOMONTH(D$1,0),IF($B2="Not Yet",TODAY(),$B2))+1-MAX(D$1,$A2),0)
    Attached Files Attached Files
    Last edited by daddylonglegs; 04-01-2013 at 11:59 AM.
    Audere est facere

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