+ Reply to Thread
Results 1 to 6 of 6

COUNTIFS 3rd Criteria not being Applied

  1. #1
    Registered User
    Join Date
    08-24-2012
    Location
    aus
    MS-Off Ver
    Excel 2013 (Home) Excel 2010 (Work)
    Posts
    26

    Post COUNTIFS 3rd Criteria not being Applied

    Dear Excel Geniuses,

    I am having an issue with COUNTIFS in Excel 2010.

    I have 1524 rows of data with one coloumn containing a set of repeating numbers representing "Flight Numbers". Then next coloumn states what trip dates it was e.g. 276 would be the 27th Saturday (6th day) and a thrid coloumn either has a time in seconds if it was successful or blank if the calculation failed.

    When i use:

    =COUNTIFS($E$4:$E$1524,K34,$F$4:$F$1524,$N$3)

    This shows 20. Which means in the entire data set there were 20 "FLIGHT NUMBERS" which matched cell K23 on the "TRIP DATE" that matches N3. So far so good.

    Now When I use:

    =COUNTIFS($E$4:$E$1524,K34,$F$4:$F$1524,$N$3,$I$4:$I$1524,"<>"&"")

    This still shows 20. When I actually look at the data manually. All 20 occurences of the Flight Matching Cell K34 on TRIP date matching N3, Coloumn "I" is blank for each one and hence should show a zero...not 20.

    What am I doing wrong?

    Additional information: Coloumn I was calculcated using a formula:

    =IF(OR(H4="TRUE",G4="FAILED"),"",G4)..... so when it is blank it was derived to be as such using ""

    Please help.

    Is there anyway I can make the thrid criteria be met?

    Kind Regards,

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: COUNTIFS 3rd Criteria not being Applied

    try just
    =COUNTIFS($E$4:$E$1524,K34,$F$4:$F$1524,$N$3,$I$4:$I$1524,"<>")
    ah that wont work either try sumproduct instead

    =SUMPRODUCT(($E$4:$E$1524=K34)*($F$4:$F$1524=$N$3)*($I$4:$I$1524<>"") )
    Last edited by martindwilson; 02-03-2013 at 07:35 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    08-24-2012
    Location
    aus
    MS-Off Ver
    Excel 2013 (Home) Excel 2010 (Work)
    Posts
    26

    Re: COUNTIFS 3rd Criteria not being Applied

    Thank you martindwilson but that returns a #VALUE! error.... I do have instances of Text in coloumns E and Coloumn F...could this be an issue?

  4. #4
    Registered User
    Join Date
    08-24-2012
    Location
    aus
    MS-Off Ver
    Excel 2013 (Home) Excel 2010 (Work)
    Posts
    26

    Re: COUNTIFS 3rd Criteria not being Applied

    Are there any other solutions or better yet an explanation on how to make the thrid criteria of COUNTIFS be utilised?

  5. #5
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: COUNTIFS 3rd Criteria not being Applied

    hi falkon007. yes unfortunately, COUNTIF will count those cells with formulas you indicated as "". try this instead:
    =COUNTIFS($E$4:$E$1524,K34,$F$4:$F$1524,$N$3,$I$4:$I$1524,">""")

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: COUNTIFS 3rd Criteria not being Applied

    =SUMPRODUCT(($E$4:$E$1524=K34)*($F$4:$F$1524=$N$3)*($I$4:$I$1524<>"") ) does not return an error you must have input it incorrectly

+ 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