+ Reply to Thread
Results 1 to 4 of 4

Countif formula with two criterias

  1. #1
    Forum Contributor
    Join Date
    11-20-2012
    Location
    stockholm
    MS-Off Ver
    Excel 2010
    Posts
    123

    Countif formula with two criterias

    Hi,

    I have a data tabel in which I would like to count the number of "0" enteries per month. In colum A I have dates, daily from a few years back - one row per day. In Colum B to F I have enteries "0" or "1"

    Then I have a summary were I caculate the number of "0" per month. I have used the countif formula and for each month changed the rows to match the dates for that specific month.

    Now I would like to set up the formula so that I don't need to change the rows range in the formula when I add a new month. The countif should count enteries if they are "0" and dates are matched. Se example file

    Many thanks!
    //Martin
    Attached Files Attached Files
    Last edited by masben; 04-04-2013 at 03:19 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: Countif formula with two criterias

    Hi Martin,

    Try the below formula in cell G4 and copy down.

    =SUMPRODUCT((A$4:A$123>=F4)*(A$4:A$123<=EOMONTH(F4,0))*($B$4:$D$123=0))
    If I've been of help, please hit the star

  3. #3
    Forum Contributor
    Join Date
    11-20-2012
    Location
    stockholm
    MS-Off Ver
    Excel 2010
    Posts
    123

    Re: Countif formula with two criterias

    Thanks Spencer,

    Works perfect!

    Many thanks!
    /Martin

    Quote Originally Posted by Spencer101 View Post
    Hi Martin,

    Try the below formula in cell G4 and copy down.

    =SUMPRODUCT((A$4:A$123>=F4)*(A$4:A$123<=EOMONTH(F4,0))*($B$4:$D$123=0))

  4. #4
    Valued Forum Contributor
    Join Date
    04-03-2012
    Location
    East Sussex, UK
    MS-Off Ver
    Excel 2003:2010
    Posts
    893

    Re: Countif formula with two criterias

    Not a problem Martin. Happy to help.

+ 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