+ Reply to Thread
Results 1 to 3 of 3

Counting Rows based on Month & Year

Hybrid View

  1. #1
    Registered User
    Join Date
    06-28-2007
    Posts
    4

    Post Counting Rows based on Month & Year

    It seems something quite simple but i just can't get my formula to work. What i got so far is:

    =COUNTIF(MASTER!c3:c999, DATE(YEAR(MASTER!c3:c999),MONTH(MASTER!c3:c999),1)=DATE(YEAR(B10),MONTH(B10),1))

    what im trying to do is count how many rows contain the month x, and the year y (in this case i've entered the value 01/11/2006 in cell b10, and so should find out the number of rows in november 2006)

    the c column on the master sheets contains various dates.

    Unfortunatalty all i get returned from this forumla is 0.

    What am i doing wrong?

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

    =Sumproduct(--(YEAR(MASTER!c3:c999)=YEAR(B10)),--(MONTH(MASTER!c3:c999)=MONTH(B10)))
    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 daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,720
    Here's another option...

    =SUMPRODUCT(--(TEXT(MASTER!C3:C999,"mmmyy")=TEXT(B10,"mmmyy")))

+ 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