+ Reply to Thread
Results 1 to 3 of 3

Determine the date of the last Sunday in a month

  1. #1
    Forum Contributor Grimace's Avatar
    Join Date
    05-04-2009
    Location
    Gold Coast, Australia
    MS-Off Ver
    Excel 2013 and Office 365 Plus
    Posts
    380

    Determine the date of the last Sunday in a month

    Good morning all, I hope your XMAS and New Years

    I am seeking a formula that will deliver me the date of specific days in the previous month and the following month, given a specific month as input data.

    eg If I provide March 2011 as my input data, I need to get the dates of:
    - the last Sunday in February 2011
    - the first Saturday in April 2011
    - the second saturday in April 2011

    This will be an ongoing resource, which I will then be copying down indefinitely.
    I know I could go through manually and input dates, but where is the fun in that?

    In the attached example .. .cells B6 to E6 are what I am looking to auto-populate, given cell A6. and then copy down.

    thanks in advance
    Darren
    Attached Files Attached Files
    Last edited by Grimace; 01-27-2011 at 10:09 PM.

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

    Re: Determine the date of the last Sunday in a month

    Hello Darren, assuming A6 will be the 1st of the month you can get the last Sunday of the previous month with this formula in B6

    =A6-WEEKDAY(A6-1)

    Now for E6 use this formula for the first Saturday in the following month

    =A6+39-DAY(A6+31)-WEEKDAY(A6+4-DAY(A6+31))

    and clearly the second Saturday is 7 days after that so C6 can be just

    =E6+7

    all date cells should be formatted with the required format e.g. dd/mm/yyyy and formulas can be copied down the columns
    Last edited by daddylonglegs; 01-27-2011 at 09:32 PM.
    Audere est facere

  3. #3
    Forum Contributor Grimace's Avatar
    Join Date
    05-04-2009
    Location
    Gold Coast, Australia
    MS-Off Ver
    Excel 2013 and Office 365 Plus
    Posts
    380

    Re: Determine the date of the last Sunday in a month

    Thanks so much for the prompt reply DLL.

    the E6 was the one that was giving me grief .... really appreciate it.

    Not too flash on the days / weeks type formulas

+ 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