+ Reply to Thread
Results 1 to 4 of 4

Count If Day of the Week

  1. #1
    Registered User
    Join Date
    06-07-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Count If Day of the Week

    I have a spreadsheet with Column A as a date, Column B is the date from column A formatted to dddd.
    I want to count the number of times each day of the week occurs in Column B of the spreadsheet. I tried Countif(B1:B17,D1), where D1 is Monday. My result is "0".

    Any ideas?

  2. #2
    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: Count If Day of the Week

    In C2

    =SUMPRODUCT(--(WEEKDAY($A$2:$A$16)=DAY(B2)))

    In B2 and numbers from 1 through 7


    A
    B
    C
    1
    Date Day Name Count
    2
    1/1/2013
    Sunday
    2
    3
    1/2/2013
    Monday
    2
    4
    1/3/2013
    Tuesday
    3
    5
    1/4/2013
    Wednesday
    2
    6
    1/5/2013
    Thursday
    2
    7
    1/6/2013
    Friday
    2
    8
    1/7/2013
    Saturday
    2
    9
    1/8/2013
    10
    1/9/2013
    11
    1/10/2013
    12
    1/11/2013
    13
    1/12/2013
    14
    1/13/2013
    15
    1/14/2013
    16
    1/15/2013
    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

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

    Re: Count If Day of the Week

    Column B still contains dates - COUNTIF counts the underlying value not the display. You can chnage column B to a formula like

    =TEXT(A1,"dddd")

    then your COUNTIF will work, or leave column B as is and use SUMPRODUCT with WEEKDAY function, e.g.

    =SUMPRODUCT(--(WEEKDAY(A1:A17)=2))
    Audere est facere

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Count If Day of the Week

    welcome to the forum, puzzlelover. another alternative:
    =SUMPRODUCT(--(TEXT($B$2:$B$16,"dddd")=C2))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ 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. [SOLVED] Count if this week?
    By mem_aryan in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-04-2013, 07:12 PM
  2. How to: identify repeat offenders within a 3 week period (week per week basis)
    By Heloc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2012, 12:43 AM
  3. count if date is this week
    By ea223 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-06-2012, 05:07 PM
  4. SUMPRODUCT to count by week
    By sanlen in forum Excel General
    Replies: 13
    Last Post: 06-16-2010, 01:40 AM

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