+ Reply to Thread
Results 1 to 8 of 8

Number of Sundays in a Month

  1. #1
    Registered User
    Join Date
    05-12-2015
    Location
    Miami, FL
    MS-Off Ver
    365
    Posts
    49

    Number of Sundays in a Month

    Hello all, I need help!

    I need to know the number of Sundays in a month... but the reference cell is the abbreviation of the month, e.g. Jan, not the first of the month. In other words, I need to know the Sundays for Jan not 1/1/2018.

    I've been trying to edit this formula to no avail: =SUMPRODUCT(N(WEEKDAY(ROW(INDIRECT(A1&":"&EOMONTH(A1,0))))=1)) works but based on dd/mm/yyyy NOT the month abbreviation.

    Please help! Thank you in advanced!

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Number of Sundays in a Month

    Can we assume that it is always for 2018?

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Number of Sundays in a Month

    So, if A1 in that formula is meant to contain a date, then you can achieve that by using this instead of A1 (twice):

    =DATEVALUE("1 "&A1&" 2018")

    or in America you may need to use:

    =DATEVALUE(A1&" 1 2018")

    where A1 now contains the 3 letter code for the month, e.g. "Jan".

    Hope this helps.

    Pete

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Number of Sundays in a Month

    Try this:

    =SUMPRODUCT(N(TEXT(ROW(INDIRECT((A1&1)+0&":"&EOMONTH((A1&1)+0,0))),"ddd")="Sun"))

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Number of Sundays in a Month

    Try

    =4+ISNUMBER(MATCH(1,WEEKDAY(--({29,30,31}&$A$1)),0))

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Number of Sundays in a Month

    Or this
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C
    1 Start Day End Day Num of SUN
    2 1/1/2018 1/31/2018 4
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  7. #7
    Registered User
    Join Date
    05-12-2015
    Location
    Miami, FL
    MS-Off Ver
    365
    Posts
    49

    Re: Number of Sundays in a Month

    Wow 63falcondude! Thank you a million! It works!!

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Number of Sundays in a Month

    Happy to help. Thanks for the rep!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to count days with excluding Sundays and split by month in one?
    By Efendi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-24-2016, 08:32 AM
  2. [SOLVED] Workdays / Saturdays / Sundays in a Month
    By JcOrlando in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2014, 12:59 AM
  3. Replies: 5
    Last Post: 12-11-2012, 01:20 AM
  4. [SOLVED] Count the number of sundays in a month
    By bajdr47 in forum Excel General
    Replies: 12
    Last Post: 07-04-2012, 07:39 PM
  5. Date Formula - 1st,2nd & 3rd Sundays of each month
    By lsmft in forum Excel General
    Replies: 7
    Last Post: 11-02-2007, 05:47 AM
  6. Excel - list days of a month, excluding Sundays
    By John in forum Excel General
    Replies: 1
    Last Post: 01-03-2006, 12:50 PM
  7. Replies: 5
    Last Post: 09-29-2005, 02:05 PM

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