+ Reply to Thread
Results 1 to 6 of 6

Count and Sum for the given month and year

  1. #1
    Forum Contributor
    Join Date
    02-15-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    657

    Count and Sum for the given month and year

    Hello Friends

    Please find the attached file.

    I want to count and sum the numbers in the Column B with the dates in Column A for the given month and year.

    thanks in advance.
    Sekar

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Count and Sum for the given month and year

    In H2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you want to count instances of dates
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you want to count instances of dates but ignore the blanks in column B.

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


    Copy down as necessary.

    BBS
    Last edited by BadlySpelledBuoy; 05-20-2016 at 09:37 AM.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Count and Sum for the given month and year

    You can use this formula in H2 for the Count:

    =SUMPRODUCT(--(TEXT($A$1:$A$92,"mmmyy")=TEXT(G2,"mmmyy")))

    and this one in I2 for the Sum:

    =SUMPRODUCT(--(TEXT($A$1:$A$92,"mmmyy")=TEXT(G2,"mmmyy")),$B$1:$B$92)

    Copy both down as required.

    Note that my counts are not the same as yours, though the Sums are.

    Hope this helps.

    Pete

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Count and Sum for the given month and year

    In H2 Cell

    =COUNTIFS(A:A,">="&EOMONTH(G2,-1)+1,A:A,"<="&EOMONTH(G2,0))


    In I2 Cell

    =SUMIFS(B:B,A:A,">="&EOMONTH(G2,-1)+1,A:A,"<="&EOMONTH(G2,0))


    Drag both the formula's down


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Count and Sum for the given month and year

    You can use this one in H2:

    =SUMPRODUCT((TEXT($A$1:$A$92,"mmmyy")=TEXT(G2,"mmmyy"))*($B$1:$B$92>0))

    to get the same results that you have (I wasn't looking at column B earlier).

    Hope this helps.

    Pete

  6. #6
    Forum Contributor
    Join Date
    02-15-2016
    Location
    India
    MS-Off Ver
    2016
    Posts
    657

    Re: Count and Sum for the given month and year

    Hello BBS Pete Seixthsense

    All of your formulas working well, thanks

+ 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. Count if text and month/year matches
    By yankiessg in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-20-2015, 11:13 AM
  2. Count occurrances in month and year given certain criteria?
    By Tarheel8181 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2014, 10:03 PM
  3. 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
  4. [SOLVED] Count Items According to Month and Year
    By yellowsnow4free in forum Excel General
    Replies: 5
    Last Post: 05-21-2012, 04:26 PM
  5. [SOLVED] Is it possible to count the day of Month/Year?
    By Joe in forum Excel General
    Replies: 1
    Last Post: 03-18-2006, 05:20 AM
  6. count dates within range by year and month
    By Isaiah25 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-04-2005, 06:06 PM
  7. Get count of records for a particular month and year
    By maxtrixx in forum Excel General
    Replies: 5
    Last Post: 04-08-2005, 03:06 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