+ Reply to Thread
Results 1 to 7 of 7

number of mondays in a month formula

  1. #1
    Forum Contributor TechRetard's Avatar
    Join Date
    06-14-2009
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    202

    number of mondays in a month formula

    Trying to find out how many Mondays are in a given month/year

    example, A1=1/1/11 answer would be 5
    A1=2/1/11 answer would be 4
    A1=5/1/11 answer would be 5
    TechRetard.ToString();

    There are always multiple ways to do something, when it doubt, drink a beer.

    I do not care if you rep or not but please mark post as Solved if there is resolution so I stop going back and checking if anything else is needed.

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

    Re: number of mondays in a month formula

    Try this formula

    =4+(DAY(A1+34)<WEEKDAY(A1-1))
    Audere est facere

  3. #3
    Forum Contributor TechRetard's Avatar
    Join Date
    06-14-2009
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    202

    Re: number of mondays in a month formula

    Quote Originally Posted by daddylonglegs View Post
    Try this formula

    =4+(DAY(A1+34)<WEEKDAY(A1-1))

    that doesn't work ... check july result

    i did find this formula and it seems to work
    Please Login or Register  to view this content.
    Only question now, for convenience sake, is there any way to fill down the monday dates?

    i.e. B1: 1/3/11, B2: 1/10/11, B3: 1/17/11, etc

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: number of mondays in a month formula

    =SUM(IF(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2,1,0))

    Entered as an array formula will give the number of " any day " between two dates where

    A2 = begin date
    B2 = End date
    C2 = weekday ( Sunday=1, Monday = 2, etc..)

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: number of mondays in a month formula

    Quote Originally Posted by TechRetard View Post
    Only question now, for convenience sake, is there any way to fill down the monday dates?
    i.e. B1: 1/3/11, B2: 1/10/11, B3: 1/17/11, etc
    Once you have the first date, =B1+7 and copied down
    HTH
    Regards, Jeff

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

    Re: number of mondays in a month formula

    Quote Originally Posted by TechRetard View Post
    that doesn't work ... check july result
    Apologies, the formula I suggested gives Sundays in the month, for Mondays the -1 should be -2 (and you can adjust for any other day of the week), i.e.

    =4+(DAY(A1+34)<WEEKDAY(A1-2))

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

    Re: number of mondays in a month formula

    To get the first Monday in the month

    =A1+7-WEEKDAY(A1+5)

    Then add 7 to get subsequent Mondays as Jeff suggests

+ 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