+ Reply to Thread
Results 1 to 3 of 3

How do I break a date range by month?

  1. #1
    HeatherDawn
    Guest

    How do I break a date range by month?

    I am trying to calculated the days in a month for a 14 day pay period. What
    I want to do is to calculate how many days are in each month if the pay
    period crosses a month. For example the begining date is 8/21/05 and it ends
    9/3/05. I was wondering if there is a formula that will allow me to
    calculated that there are 3 days in Sept and 11 in August. Thanks

  2. #2
    Dave O
    Guest

    Re: How do I break a date range by month?

    I mocked up some sample data: pay period start date in column A, end
    date in column B. When A2 and B2 are populated, the formula in C2 is
    =IF(MONTH(A3)<>MONTH(B3),"Days in " & TEXT(A3,"mmmm") &": " &
    EOMONTH(A3,0)-A3+1 & "; Days in " & TEXT(B3,"mmmm") &":
    "&B3-EOMONTH(B3,-1),"Days in " & TEXT(A3,"mmmm") &": " & B3-A3+1)

    This will determine the number of days in a single month or in both
    months when the pay period spans 2 months.


  3. #3
    Bob Phillips
    Guest

    Re: How do I break a date range by month?

    =DATE(YEAR(start),MONTH(start)+1,0)-start+1

    and

    =end-DATE(YEAR(end),MONTH(end),0)

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "HeatherDawn" <[email protected]> wrote in message
    news:[email protected]...
    > I am trying to calculated the days in a month for a 14 day pay period.

    What
    > I want to do is to calculate how many days are in each month if the pay
    > period crosses a month. For example the begining date is 8/21/05 and it

    ends
    > 9/3/05. I was wondering if there is a formula that will allow me to
    > calculated that there are 3 days in Sept and 11 in August. Thanks




+ 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