+ Reply to Thread
Results 1 to 6 of 6

Formula needed for COUNTIF in current month

  1. #1
    Registered User
    Join Date
    03-20-2009
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Formula needed for COUNTIF in current month

    I have a spreadsheet that tracks all the projects we have worked on over the last 5 years up until today. Column H lists the start date of each of the projects in MM/DD/YYYY format.

    I want to give a count of how many projects we are working on in the current month based on the start date in Column H. Can I use COUNTIF for this and what is the formula to use?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Formula needed for COUNTIF in current month

    Try using SUMPRODUCT like this

    =SUMPRODUCT((TEXT(H2:H100,"mmm-yy")=TEXT(TODAY(),"mmm-yy))+0)

    adjust range as required
    Audere est facere

  3. #3
    Registered User
    Join Date
    03-20-2009
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Formula needed for COUNTIF in current month

    That worked perfectly but only if the date in column H is today's date. How do I get it to sum for any date in the current month?

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Formula needed for COUNTIF in current month

    It should count any date in H2:H100 that is in the current month, do you want it to include previous dates for projects that are still going in this month, how do you know if a project is no longer active, do you have an end date column?

  5. #5
    Registered User
    Join Date
    03-20-2009
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Formula needed for COUNTIF in current month

    I do have an end date column but I just want to know which projects were started in the current month.

    And I checked the formula today (Aug 2) and it is returning 0 projects. Yesterday it returned 2 projects, but only because I had entered the start date as August 1.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Formula needed for COUNTIF in current month

    The formula should count all dates in the current month, i.e. all August 2012 dates at the moment. I noticed I left a quote out at the end though, so it should be like this

    =SUMPRODUCT((TEXT(H2:H100,"mmm-yy")=TEXT(TODAY(),"mmm-yy"))+0)

    Perhaps you corrected my error incorrectly?

    That converts todays date into a text string of the month and year, i.e. Aug-12 and then counts how many dates in H2:H100 also convert to the same string, hence counting all in the current month

+ 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