+ Reply to Thread
Results 1 to 9 of 9

countifs help

  1. #1
    Registered User
    Join Date
    05-26-2015
    Location
    Slovakia
    MS-Off Ver
    2013
    Posts
    5

    countifs help

    Hello,

    I would like to ask for an assistance with following formula, using countifs in excel 2013

    This is so far what I've got
    =COUNTIFS(F3:F12, "XY", J3:J12, "<="&K3:K12)

    the first condition is working, it is simply comparing text in column F, from rows 3 - 12. The other one not so much. Once the first condition is fulfilled, it should compare dates in column J (rows 3 - 12), with dates in column K (rows 3 - 12), and once the date in J column is lesser or equal to the one in K column (comparing the same rows for both columns of course), it should higher the number by 1 (starting from 0).

    I have tried it like this, also: =COUNTIFS(F3:F12, "XY", J3:J12, "<="&K8) - to compare one single cell, and it worked like a charm. Both conditions were fulfilled, and succeeded, and the number got higher by 1 (so was actually 1).

    Could you please advice, how to fix the first equation, since I need to compare date from each row in column J, with each date in column K?

    Thank you in advance all :-)

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: countifs help

    Maybe this...

    =SUMPRODUCT(COUNTIFS(F3:F12,"XY",J3:J12,"<="&K3:K12))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

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

    Re: countifs help

    Maybe the dates in column K are not dates but text.
    Use ISTEXT() to test different values in column K.
    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.

  4. #4
    Registered User
    Join Date
    05-26-2015
    Location
    Slovakia
    MS-Off Ver
    2013
    Posts
    5

    Re: countifs help

    thanks for a quick reply, however does not work properly. From my table - The first condition is fulfilled 3 times, and the other one only once, so the actual result should be only 1. However with your equation it's throwing me 7, and once I change some date, the result is moving up/down by 1 or even 2. Any advice?

  5. #5
    Registered User
    Join Date
    05-26-2015
    Location
    Slovakia
    MS-Off Ver
    2013
    Posts
    5

    Re: countifs help

    Quote Originally Posted by Special-K View Post
    Maybe the dates in column K are not dates but text.
    Use ISTEXT() to test different values in column K.
    dates are in this form: 5/13/2015

  6. #6
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: countifs help

    I could do it with a helper column, see the attached file!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-26-2015
    Location
    Slovakia
    MS-Off Ver
    2013
    Posts
    5

    Re: countifs help

    Quote Originally Posted by cbatrody View Post
    I could do it with a helper column, see the attached file!
    this is the correct functionality. If would be possible to do it without the additional column? if not, this will be of course enough. Thank you!

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: countifs help

    Try this
    =SUMPRODUCT(--(F3:F12="XY"),--(J3:J12<=K3:K12))
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 05-26-2015 at 08:43 AM.

  9. #9
    Registered User
    Join Date
    05-26-2015
    Location
    Slovakia
    MS-Off Ver
    2013
    Posts
    5

    Re: countifs help

    Quote Originally Posted by kvsrinivasamurthy View Post
    Try this
    =SUMPRODUCT(--(F3:F12="XY"),--(J3:J12<=K3:K12))
    works! thanks so much!

+ 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] Countifs + Countifs - replacement?
    By JulieQ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-05-2015, 03:02 PM
  2. [SOLVED] Help with COUNTIFS
    By reedersketer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-08-2014, 04:51 PM
  3. COUNTIFS OR COUNTIFS needs to work
    By joshbellfi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-23-2013, 10:55 AM
  4. COUNTIFS OR...multiple countifs without duplication in the numbers
    By HooligaD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2012, 09:53 AM
  5. Replies: 0
    Last Post: 12-16-2011, 09:01 AM

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