+ Reply to Thread
Results 1 to 5 of 5

Using Countif to calculate the number of days in a column

  1. #1
    Forum Contributor
    Join Date
    12-15-2005
    MS-Off Ver
    Office 2007
    Posts
    346

    Using Countif to calculate the number of days in a column

    I am trying to use the following formula to count the number of times a day appears in a column. It doesn't seem to be working the way I want it to.

    =COUNTIF($A13:$A200,"Sunday")

    It could be the way the days of the week are gathered on the sheet, you can see the attached workbook to see how I am using it.

    thanks for any help with this.

    Nick
    Attached Files Attached Files
    Last edited by avidcat; 12-16-2009 at 04:04 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Using Countif to calculate the number of days in a column

    =sumproduct(--(weekday(a1:a20,1)=1))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Using Countif to calculate the number of days in a column

    Hi,

    In F1,and copied down:

    =SUMPRODUCT((TEXT($A$13:$A$100,"dddd")=E5)*1)
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Forum Contributor
    Join Date
    12-15-2005
    MS-Off Ver
    Office 2007
    Posts
    346

    Re: Using Countif to calculate the number of days in a column

    Thanks Sweep that worked perfect.

  5. #5
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Using Countif to calculate the number of days in a column

    Or this one (array entered)
    Please Login or Register  to view this content.
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

+ 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