+ Reply to Thread
Results 1 to 7 of 7

Count of Sundays

Hybrid View

sick stigma Count of Sundays 05-11-2012, 06:31 PM
Haseeb Avarakkan Re: Count of Sundays 05-11-2012, 07:02 PM
FDibbins Re: Count of Sundays 05-11-2012, 07:05 PM
Cutter Re: Count of Sundays 05-11-2012, 07:08 PM
sick stigma Re: Count of Sundays 05-12-2012, 11:58 AM
Ron Coderre Re: Count of Sundays 05-11-2012, 07:08 PM
daddylonglegs Re: Count of Sundays 05-12-2012, 12:12 PM
  1. #1
    Forum Contributor
    Join Date
    06-20-2007
    Location
    Buckeye, AZ
    MS-Off Ver
    365
    Posts
    298

    Count of Sundays

    In the attached workbook, I need to count the number of occourances of each day of the week. Any help would be greatly appreciated!
    Sick
    Attached Files Attached Files
    Last edited by sick stigma; 05-12-2012 at 12:15 PM.

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Count of Sundays

    Try,

    =SUMPRODUCT((TEXT($B$12:$B$100,"ddd;;;")="Sun")+0)

    Adjust the range & Days
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Count of Sundays

    see if the attached is what you want?
    Attached Files Attached Files
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Count of Sundays

    Try
    =SUMPRODUCT(--(WEEKDAY(B12:B100)=1))

  5. #5
    Forum Contributor
    Join Date
    06-20-2007
    Location
    Buckeye, AZ
    MS-Off Ver
    365
    Posts
    298

    Re: Count of Sundays

    Found my problem! Cell must be formatted to number, not date! Duh!!
    Thanks to all for your suggestions!
    Solved "Regrettably, each suggestion returns a date (Friday, January 06, 1900),
    not a count or sum of count. What am I doing wrong??????"
    Last edited by sick stigma; 05-12-2012 at 12:14 PM. Reason: solved

  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: Count of Sundays

    Using your posted workbook, here's one approach for counting Saturdays:
    B5: =SUMPRODUCT((WEEKDAY(B12:B112)=7)*(B12:B112>0))

    Is that something you can work with?
    Last edited by Ron Coderre; 05-11-2012 at 07:17 PM. Reason: Removed unnecessary chars from formula
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

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

    Re: Count of Sundays

    that's just a formatting issue, format cell with formula as general
    Audere est facere

+ 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