+ Reply to Thread
Results 1 to 6 of 6

Count Number of Events using both Month and Year

  1. #1
    Registered User
    Join Date
    02-12-2021
    Location
    England
    MS-Off Ver
    Microsoft 365 Version 2012
    Posts
    33

    Count Number of Events using both Month and Year

    Hi

    Please refer to attached example spreadsheet.

    Using separate tabs within the same spreadsheet, I require to tally up the number of times a date (i.e. Jan 2021) is entered under the Date raised (A5:11) column under Tab 1. Tab 2, E4 requires the formula.

    I have seen similar formulas on here but can't get them t work as different to what I need.

    Kind Regards
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,862

    Re: Count Number of Events using both Month and Year

    In E4 copied across:

    =COUNTIFS($A$5:$A$11,">="&E$3,$A$5:$A$11,"<="&EOMONTH(E$3,0))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Count Number of Events using both Month and Year

    Hi
    please try this in E4 and drag to the right:
    =SUM(--(MONTH($A$5:$A$11)=MONTH(E3)))

    EDIT:

    sorry didn't notice the year issue, here is my amendment:
    =SUM(--(($A$5:$A$11) > =(E3))*((($A$5:$A$11) < EOMONTH(E3,0)+1)))
    Attached Files Attached Files
    Last edited by Limor_OP; 02-13-2021 at 11:00 AM.

  4. #4
    Registered User
    Join Date
    02-12-2021
    Location
    England
    MS-Off Ver
    Microsoft 365 Version 2012
    Posts
    33

    Re: Count Number of Events using both Month and Year

    Hi Ali

    It works on the example you sent, but I can't get it to work on the actual spreadsheet, think it may have something to do with the cell I'm referencing which is E3 on the example.
    The actual spreadsheet is set as a date showing Month and year. Will it have something to do with that?

    Thanks

  5. #5
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,782

    Re: Count Number of Events using both Month and Year

    Sheet2

    E4=SUMPRODUCT((Sheet1!$A$5:$A$100<>"")*(MONTH(Sheet1!$A$5:$A$100)=MONTH(Sheet2!E$3))*(YEAR(Sheet1!$A$5:$A$100)=YEAR(Sheet2!E$3)))

    for hide 0 custom format [=0]""

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,862

    Re: Count Number of Events using both Month and Year

    Will it have something to do with that?
    Probably, but if you give me chalk and then try to apply what I wrote for chalk to cheese, and cheese that I can't even see, then it's over to you.

    Sample workbooks need to properly represent the real data, otherwise they are next to useless.

+ 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] Summary Count Of Days / Events For Month
    By Harry Basra in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 03-20-2019, 10:40 AM
  2. [SOLVED] Summary Count Of Days / Events For Month
    By Harry Basra in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-28-2019, 11:17 AM
  3. Replies: 16
    Last Post: 08-22-2017, 11:20 AM
  4. [SOLVED] Count the number of time a month and year occur in a column
    By jh51745 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-17-2015, 09:17 AM
  5. Count number of Dates in a range that match Year and month
    By the_penfool in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-13-2015, 11:49 AM
  6. Replies: 2
    Last Post: 12-17-2013, 06:30 AM
  7. Count number of events per month in a range
    By cpots13 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-27-2013, 04:03 PM

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