+ Reply to Thread
Results 1 to 6 of 6

Counting events by month

  1. #1
    Registered User
    Join Date
    09-25-2012
    Location
    Maryland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Counting events by month

    Hi ALl,

    I am trying to count the number of events happened per month in the folowing format:

    January Feb March April May
    Mark Sameul 5 8 2 0 4
    Eduward Mathes 2 5 4 5 5

    The data in the table where it will count is as the below:

    01/01/2012
    01/17/2012
    01/5/2012
    01/5/2012
    01/7/2012

    I tried to use countif(Range,Criteria) the range is where the date field, it is sheet3 A:A, and the criteria is "January" which is cell B2 but for somereason is not counting right......

    help please.....
    Last edited by Mr2006; 09-25-2012 at 09:21 PM.

  2. #2
    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
    52,938

    Re: Counting events by month

    it probably has something to do wuth the format you have the months in.

    can you attach a sample workbook please?

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    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

  3. #3
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Counting events by month

    Hi Mr2006

    Something along these lines.

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

  4. #4
    Registered User
    Join Date
    09-25-2012
    Location
    Maryland
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Counting events by month

    I attached the file.

    I used the sumproduct below but since I have lots of data, excel became very slow.

    SUMPRODUCT(--(TEXT(Your Array,"mmmm")=Cell_Ref#),--(Your Array =EG:"Eduward"))
    Attached Files Attached Files

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Counting events by month

    I notice you are using COUNTIFS on the attached spreadsheet, so you are using a 2007 or later version of Excel. Hence use,

    In B3
    =COUNTIFS(Data!$B:$B,">="&B$2,Data!$B:$B,"<="&EOMONTH(B$2,0),Data!$A:$A,$A3)

    P.S. update your profile to reflect your Excel verison!
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Counting events by month

    Hi Mr2006

    I was not sure what you required exactly from your 1st post, so I had a stab at it!
    Glad you have sorted it.

    Remember to update your profile as Ace_XL pointed out with regards to COUNTIF.

+ 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