+ Reply to Thread
Results 1 to 5 of 5

Using COUNTIF to return the sum of dates that fall within a Month/Year range.

  1. #1
    Forum Contributor
    Join Date
    12-15-2005
    MS-Off Ver
    Office 2007
    Posts
    346

    Using COUNTIF to return the sum of dates that fall within a Month/Year range.

    I want to use a COUNTIF to return the sum of all the dates that fall within a given month/year.

    For example:
    E1 Contains the date July-2009

    Column A has date entries such as July 3, 2009, July 18, 2009, August 4 2009...

    In F1 I want to return the sum of all dates that fall within the month of E1.

    I attached an example, I appreciate any help with this.

    thanks,
    Nick
    Attached Files Attached Files
    Last edited by avidcat; 01-20-2010 at 10:19 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: Using COUNTIF to return the sum of dates that fall within a Month/Year range.

    Try:

    =SUMPRODUCT(--(TEXT($A$2:$A$14,"mmmyy")=TEXT(E1,"mmmyy")))

    this is for month and year match
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,400

    Re: Using COUNTIF to return the sum of dates that fall within a Month/Year range.

    or,

    =SUMPRODUCT(--(MONTH(A2:A11)=MONTH(E1)))
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  4. #4
    Forum Contributor
    Join Date
    12-15-2005
    MS-Off Ver
    Office 2007
    Posts
    346

    Re: Using COUNTIF to return the sum of dates that fall within a Month/Year range.

    Thanks! Works great.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,902

    Re: Using COUNTIF to return the sum of dates that fall within a Month/Year range.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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