+ Reply to Thread
Results 1 to 5 of 5

COUNTIFS having a range as criteria

  1. #1
    Registered User
    Join Date
    02-04-2015
    Location
    Ohio USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    COUNTIFS having a range as criteria

    Hi,
    I have a situation where in I have to use COUNTIFS(range1, Criteria1, Range2, Criteria2...), where criteria should be a range in the same excel that has text in it. Is there a way for that? My actual situation is
    Sheet 1 : col A and Col B - Text values
    Sheet 2 : Col C and Col D - Text values

    For every value in Col A, check if it is there in Col C, the take the corresponding value from Col D and check if it is the same in Col B. I need the count of how many matches or doesn't match. I tried to use Vlookup on this, but couldn't get what I wanted. I appreciate your suggestions on this.

    If I can know if a "Range of text" can be used in the CRITERIA part, it would be great.
    table2.JPG

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,681

    Re: COUNTIFS having a range as criteria

    Try using COUNTIFS like this

    =SUMPRODUCT(COUNTIFS(A:A,D2:D5,B:B,E2:E5))

    That should give 2 for your example

    Note: that gives you the total for I7 without needing the I2:I6 calculations
    Last edited by daddylonglegs; 02-04-2015 at 01:34 PM.
    Audere est facere

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,644

    Re: COUNTIFS having a range as criteria

    Not sure why range criteria is needed here, but give it a try I2:

    =COUNTIFS($D$2:$D$5,A2,$E$2:$E$5,B5)
    Quang PT

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,681

    Re: COUNTIFS having a range as criteria


  5. #5
    Registered User
    Join Date
    02-04-2015
    Location
    Ohio USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: COUNTIFS having a range as criteria

    This is absolutely what I needed :-) Thank you very 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. Countifs with multiple criteria in single criteria range
    By MCP313 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-01-2016, 03:51 AM
  2. [SOLVED] COUNTIFS with many criteria in same range
    By asterobelix in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-06-2014, 12:10 AM
  3. COUNTIFS with Multiple Criteria in One Range
    By mphillips in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-19-2013, 02:43 PM
  4. Countifs in VBA. Loops on criteria range
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-31-2011, 06:35 PM
  5. COUNTIFS with a range of values for criteria
    By sslack88 in forum Excel General
    Replies: 3
    Last Post: 11-03-2008, 03:14 PM

Tags for this Thread

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