+ Reply to Thread
Results 1 to 7 of 7

Calendar Formula 1st Day of Month, 2nd Wed, Last Day of Month

  1. #1
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    392

    Calendar Formula 1st Day of Month, 2nd Wed, Last Day of Month

    I am trying to set up a spread sheet with the 1st Week Day of Month, 2Nd Wed of the Month and Last Week Day of Month. What or is there a formula that will give me those dates each month?
    Last edited by Wskip49; 06-30-2012 at 10:03 PM. Reason: Needed to change statement

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Calendar Formula 1st Day of Month, 2nd Wed, Last Day of Month

    Which version of Excel are you using?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Calendar Formula 1st Day of Month, 2nd Wed, Last Day of Month

    With
    A1: any date....15-Jun-2012

    Try these regular formulas:
    First of the month:
    =A1-DAY(A1)+1

    Last of the month:
    =EOMONTH(A1,0)....Excel 2007+ or Pre-2007 with Analysis ToolPak
    =DATE(YEAR(A1),MONTH(A1)+1,0)...All versions

    2nd Wednesday of the month:
    =(A1-DAY(A1)+1+7*2)-WEEKDAY(A1-DAY(A1)+8-MATCH("Wed",{"SUN","MON","TUE","WED","THU","FRI","SAT"},0))
    or...since you know you want Wednesday:
    =(A1-DAY(A1)+1+7*2)-WEEKDAY(A1-DAY(A1)+4)

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    392

    Re: Calendar Formula 1st Day of Month, 2nd Wed, Last Day of Month

    I am using 2007

  5. #5
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    392

    Re: Calendar Formula 1st Day of Month, 2nd Wed, Last Day of Month

    This may be pushing it a little, however, I would like the formula to tell me the first week day of the month, and the last week day of the month. No action takes place on weekends.

    Thanks

  6. #6
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Calendar Formula 1st Day of Month, 2nd Wed, Last Day of Month

    Quote Originally Posted by Wskip49 View Post
    This may be pushing it a little, however, I would like the formula to tell me the first week day of the month, and the last week day of the month. No action takes place on weekends.

    Thanks
    Not a problem...especially since you're using Excel 2007
    First workday of the month:
    =WORKDAY(EOMONTH(A1,-1),1)

    Last workday of the month:
    =WORKDAY(EOMONTH(A1,0)+1,-1)

    NOTE: the WORKDAY function can read from a list of holiday dates and exclude them from "workdays".
    So, if cells Z1:Z12 contained holiday dates, these would be the formulas:
    First workday of the month:
    =WORKDAY(EOMONTH(A1,-1),1,Z1:Z12)

    Last workday of the month:
    =WORKDAY(EOMONTH(A1,0)+1,-1,Z1:Z12)

    (See Excel Help for the details.)

    Does that help?

  7. #7
    Forum Contributor
    Join Date
    03-08-2007
    Location
    St. Augustine, Fl
    MS-Off Ver
    Excel 2021 for Mac
    Posts
    392

    Re: Calendar Formula 1st Day of Month, 2nd Wed, Last Day of Month

    This is great. Thank you so much.

+ 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