+ Reply to Thread
Results 1 to 5 of 5

How to use COUNTIFS and COUNTIF with multiple criteria using dates

  1. #1
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    How to use COUNTIFS and COUNTIF with multiple criteria using dates

    I have a spreadsheet with a due date column J and a status column F.

    I want to count the number of cells that are overdue in J, but if the status column in F says "complete" or "closed", it will not be counted.

    Any help would be greatly appreciated. Thank you.
    Last edited by rowena229; 09-15-2020 at 02:12 PM.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.95 for Mac MS 365
    Posts
    8,682

    Re: How to use COUNTIFS and COUNTIF with multiple criteria using dates

    in the absence of any additional information you could use a sumproduct for this, like this...
    =SUMPRODUCT((J2:J6<=TODAY())*(F2:F6<>"complete")*(F2:F6<>"closed"))
    this will count all items in J2 to J6 where they are less than or equal to today and not equal to either complete or closed in col F.
    adjust from there.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

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

    Re: How to use COUNTIFS and COUNTIF with multiple criteria using dates

    You won't be able to use COUNTIF, as that is for single conditions.

    You could use COUNTIFS like this:

    =COUNTIFS(J:J,"<="&TODAY(),F:F,"<>c*")

    but only with Excel versions from 2007 or later - your profile shows that yo are using Excel 2003, so please update this if it is no longer valid.

    Note that the asterisk is the wildcard character so it is just looking for the first letter in column F beginning with "c", but if you have other text which also begins with c then the formula will fail.

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: How to use COUNTIFS and COUNTIF with multiple criteria using dates

    Quote Originally Posted by Sam Capricci View Post
    in the absence of any additional information you could use a sumproduct for this, like this...
    =SUMPRODUCT((J2:J6<=TODAY())*(F2:F6<>"complete")*(F2:F6<>"closed"))
    this will count all items in J2 to J6 where they are less than or equal to today and not equal to either complete or closed in col F.
    adjust from there.
    Thank you Sam Capricci! This worked!

  5. #5
    Forum Contributor
    Join Date
    03-20-2013
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    108

    Re: How to use COUNTIFS and COUNTIF with multiple criteria using dates

    Quote Originally Posted by Pete_UK View Post
    You won't be able to use COUNTIF, as that is for single conditions.

    You could use COUNTIFS like this:

    =COUNTIFS(J:J,"<="&TODAY(),F:F,"<>c*")

    but only with Excel versions from 2007 or later - your profile shows that yo are using Excel 2003, so please update this if it is no longer valid.

    Note that the asterisk is the wildcard character so it is just looking for the first letter in column F beginning with "c", but if you have other text which also begins with c then the formula will fail.

    Hope this helps.

    Pete
    Thank you Pete! This also worked!

+ 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. [SOLVED] COUNTIF or COUNTIFS with multiple criteria
    By rakotonirinas in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-19-2020, 12:06 PM
  2. [SOLVED] Vertical and Horizontal Countif between dates with multiple criteria
    By ShakJames in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-16-2019, 06:17 AM
  3. [SOLVED] Using Multiple Criteria With Countif or Countifs Formula
    By kozakb in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-15-2019, 06:37 PM
  4. [SOLVED] Countif between 2 dates with multiple criteria
    By Sasquatch2014 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-15-2015, 09:22 AM
  5. [SOLVED] Countif between 2 dates and multiple criteria
    By Sasquatch2014 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-14-2015, 10:55 AM
  6. Countifs criteria between two dates
    By Si902 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-24-2011, 05:47 AM
  7. [SOLVED] Use multiple criteria with COUNTIF: between dates and not blank
    By l.shields in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-13-2006, 02:25 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