+ Reply to Thread
Results 1 to 4 of 4

Countifs by Month, Year, and Event

  1. #1
    Forum Contributor
    Join Date
    02-27-2004
    Location
    California, United States
    MS-Off Ver
    Excel 2016
    Posts
    315

    Countifs by Month, Year, and Event

    I am trying to create a report from a long list of data (which continues to grow) where I can list and chart the number of events by month and year. I tried the formula:

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


    but Excel doesn't like the format.

    I have attached a sample spreadsheet which has the data on tab 1 and the report on tab 2. I have a section on tab 2 for the expected results (only for Jan and Feb though).

    Thank you in advance for any assistance you can give me.

    Cliff
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Countifs by Month, Year, and Event

    In B3:
    =COUNTIFS(Sheet1!$A:$A,">="&DATE($X$1,MONTH(($A3&1)+0),1),Sheet1!$A:$A,"<="&EOMONTH(DATE($X$1,MONTH(($A3&1)+0),1),0),Sheet1!$K:$K,B$2)

    Copy down to B14 & across to column G.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Countifs by Month, Year, and Event

    Quote Originally Posted by CWatsonJr View Post
    COUNTIFS(text(month(Sheet1!$A:$A),"mmm"),$A3,text(year(Sheet1!$A:$A),"yyyy"),$X$1,Sheet1!$K:$K,B$2)
    You can't use the TEXT function on a range array in the COUNTIFS function.

    Try this...

    =SUMPRODUCT(--(TEXT(Sheet1!$A2:$A100,"mmmyyyy")=$A3&$X$1),--(Sheet1!$K2:$K100=B$2))

    You should avoid using entire columns as range references in the SUMPRODUCT function. Use smaller specific ranges.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Contributor
    Join Date
    02-27-2004
    Location
    California, United States
    MS-Off Ver
    Excel 2016
    Posts
    315

    Re: Countifs by Month, Year, and Event

    Thank you CK76 and Tony Valko.

    CK76, this worked perfectly and is exactly what I needed.

    Thank you again!!!!

+ 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. Trying to use COUNTIFS to count prior year orders in a current month
    By NiceTxn in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-05-2016, 10:40 AM
  2. Running Totals from 24 hours to month, month to year without year decreasing
    By Safetyintern in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-20-2015, 01:13 PM
  3. Graphing dates by month/year with 2 bars per month/year
    By Ellpoyohlokoh in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-22-2014, 05:25 AM
  4. sumproduct+countifs+month year function does not work
    By apskhinda in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2013, 07:01 AM
  5. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  6. Countifs month and year match
    By jakeisbill in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-11-2013, 03:17 AM
  7. If Column A Month and Year = ColumnB Todays Month and Year then send email
    By HACCStaff in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-15-2013, 12:47 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