+ Reply to Thread
Results 1 to 7 of 7

Rounding Dates up to the 15th or the last day of the month

  1. #1
    Registered User
    Join Date
    10-11-2010
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Rounding Dates up to the 15th or the last day of the month

    I'm trying to identify a list of effective dates to the respective pay periods by using a rounding formula so for example, an effective date of 8/2/10 would be in the 8/15/10 pay period and 8/16/10 would be in the 8/31/10 pay period. Any help would be awesome!
    Last edited by karenbr; 10-11-2010 at 01:47 PM. Reason: Solved
    Karen

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Rounding Dates up to the 15th or the last day of the month

    What happens if the 15th or last day of month is a non-working day ?

  3. #3
    Registered User
    Join Date
    10-11-2010
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Rounding Dates up to the 15th or the last day of the month

    Quote Originally Posted by DonkeyOte View Post
    What happens if the 15th or last day of month is a non-working day ?
    It doesn't matter if it's a working or non-working day. I'm looking for the pay period, not the actual pay date.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Rounding Dates up to the 15th or the last day of the month

    Numerous approaches in truth

    Please Login or Register  to view this content.
    if you prefer to avoid EOMONTH

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-11-2010
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Rounding Dates up to the 15th or the last day of the month

    Thanks! I just stumbled through a similar solution. I found a formula to calculate for first day of the month and added 14 to get the 15th, and then found another formula that calculated the last day of the month, but yours looks much simpler!

    =IF(DAY(A1)<16,(DATE(YEAR(A1),MONTH(A1),1))+14,(DATE(YEAR(A1),MONTH(A1)+1,0)))

  6. #6
    Registered User
    Join Date
    12-12-2011
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Rounding Dates up to the last day of the month & adding 11 months

    How does this formula account for leap year?

    I have a contract that should start on 2/10/12 and should be effective until the 31st day in January 2013 but the formula gives me 1/29/13. I am using this to calculate other contracts as well so it needs to work for other months (ie: a contract starting 3/4/12 should calculate an expiration date of 2/28/13).

    I have tried both of these formulas:
    =EDATE(IF(DAY(Q15)<1,Q15+31-DAY(Q15),EOMONTH(Q15,0)),11)

    =EDATE(IF(DAY(Q16)<1,(DATE(YEAR(Q16),MONTH(Q16),1))+31,(DATE(YEAR(Q16),MONTH(Q16)+1,0))),11)

    Thanks.

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Rounding Dates up to the 15th or the last day of the month

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.
    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