+ Reply to Thread
Results 1 to 6 of 6

CountIF with multiple conditions

  1. #1
    Forum Contributor
    Join Date
    08-15-2006
    Location
    USA
    MS-Off Ver
    Office 365, 64 bit
    Posts
    372

    CountIF with multiple conditions

    In the attached file, we track the number of CRs that are still open and aging but need to be closed. We have over 500 at any given time and doing this manually is becoming a tedious task. I only provided a sample... The summary tab has the table and the Data tab has the data from which I need a formula to count based on the conditions outlined... thx
    Attached Files Attached Files
    Last edited by rz6657; 08-18-2017 at 10:37 AM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: CountIF with multiple conditions

    It will be usefull if you add the expected result in your file (manualy).

    I will make the solution with a pivot table but want to check the (expected) result.
    Last edited by oeldere; 08-18-2017 at 10:26 AM. Reason: I will make etc
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: CountIF with multiple conditions

    Hi,

    Your formulas might be
    E8: =COUNTIFS(Data!$E:$E,$D$7,Data!$J:$J,E$7,Data!$H:$H,"<>Validated",Data!$K:$K,">="&TODAY()-30)
    E9: =COUNTIFS(Data!$E:$E,$D$7,Data!$J:$J,E$7,Data!$H:$H,"<>Validated",Data!$K:$K,"<"&TODAY()-30,Data!$K:$K,">"&TODAY()-60)
    E10: =COUNTIFS(Data!$E:$E,$D$7,Data!$J:$J,E$7,Data!$H:$H,"<>Validated",Data!$K:$K,"<"&TODAY()-60,Data!$K:$K,">"&TODAY()-90)
    E11: =COUNTIFS(Data!$E:$E,$D$7,Data!$J:$J,E$7,Data!$H:$H,"<>Validated",Data!$K:$K,"<"&TODAY()-90)
    E12: =COUNTIFS(Data!$E:$E,$D$7,Data!$J:$J,E$7,Data!$H:$H,"Validated",Data!$K:$K,"<>",Data!$L:$L,"<>")
    and copy those across to the other two columns. It looks as though any date in L equates to a validated status, in which case the last formula could be shortened a little
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Forum Contributor
    Join Date
    08-15-2006
    Location
    USA
    MS-Off Ver
    Office 365, 64 bit
    Posts
    372

    Re: CountIF with multiple conditions

    I added the expected results file

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: CountIF with multiple conditions

    See the attached file.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: CountIF with multiple conditions

    Try

    in e8
    =SUMPRODUCT((Data!E12:E33=$D$7)*(Data!H12:H33<>"Validated")*(Data!J12:J33=E$7)*(Data!L12:L33<>"")*(Data!K12:K33<=TODAY()+30))

    in E9
    =SUMPRODUCT((Data!E12:E33=$D$7)*(Data!H12:H33<>"Validated")*(Data!J12:J33=E$7)*(Data!L12:L33<>"")*(Data!K12:K33>TODAY()+30)*(Data!K12:K33<=TODAY()+60))
    in E10
    =SUMPRODUCT((Data!E12:E33=$D$7)*(Data!H12:H33<>"Validated")*(Data!J12:J33=E$7)*(Data!L12:L33<>"")*(Data!K12:K33>TODAY()+60)*(Data!K12:K33<=TODAY()+90))
    in E11
    =SUMPRODUCT((Data!E12:E33=$D$7)*(Data!H12:H33<>"Validated")*(Data!J12:J33=E$7)*(Data!L12:L33<>"")*(Data!K12:K33>TODAY()+90))
    in E12
    =SUMPRODUCT((Data!E12:E33=$D$7)*(Data!H12:H33="Validated")*(Data!K12:kJ33<>"")*(Data!K12:kJ33<>""))

    copy across the rows
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

+ 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. Countif multiple conditions
    By EXCELNEWCOMER in forum Excel General
    Replies: 3
    Last Post: 01-15-2010, 10:45 AM
  2. Multiple Conditions for COUNTIF?
    By Fonzy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-08-2008, 11:46 AM
  3. COUNTIF Multiple Conditions
    By Paul Sheppard in forum Excel General
    Replies: 5
    Last Post: 12-28-2005, 03:10 PM
  4. [SOLVED] COUNTIF and multiple conditions
    By Sami in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-28-2005, 05:05 AM
  5. Multiple conditions on a countif
    By Mr Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  6. Multiple conditions on a countif
    By Mr Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  7. Multiple conditions on a countif
    By Mr Mike in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  8. Multiple conditions on a countif
    By Mr Mike in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-29-2005, 11:05 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