+ Reply to Thread
Results 1 to 5 of 5

First Monday of Year

  1. #1
    Registered User
    Join Date
    04-02-2009
    Location
    USA
    MS-Off Ver
    Excel 2002
    Posts
    12

    First Monday of Year

    I am trying to write a function that will display the first Monday of the year based on the user entry.

    For example, if I enter;

    5/1/2011, It should produce 1/3/2011...
    12/31/2012, it should produce 1/2/2012...

    etc...



    I am sure that this is very easy, however I am having a tough time with this one. Thanks in advance.
    Last edited by Medusa; 04-30-2009 at 05:35 PM.

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

    re: First Monday of Year

    If the input date is in cell A1 then this formula will give the first Monday of the year

    =DATE(YEAR(A1),1,1)-WEEKDAY(DATE(YEAR(A1),1,6))

  3. #3
    Registered User
    Join Date
    04-02-2009
    Location
    USA
    MS-Off Ver
    Excel 2002
    Posts
    12

    re: First Monday of Year

    Quote Originally Posted by daddylonglegs View Post
    If the input date is in cell A1 then this formula will give the first Monday of the year

    =DATE(YEAR(A1),1,1)-WEEKDAY(DATE(YEAR(A1),1,6))


    This returns the last Monday of the previous year... Is the easiest fix for this to "+7" the equation?...

    Thanks!

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

    re: First Monday of Year

    Sorry, I had it working but amended the formula erroneously at the end, as you say you could add 7 but it should really be like this

    =DATE(YEAR(A1),1,8)-WEEKDAY(DATE(YEAR(A1),1,6))

  5. #5
    Registered User
    Join Date
    04-02-2009
    Location
    USA
    MS-Off Ver
    Excel 2002
    Posts
    12

    re: First Monday of Year

    Excellent. 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