How to use Excel COUNTIFS and COUNTIF with multiple criteria

The tutorial explains how to use COUNTIFS and COUNTIF formulas with multiple criteria in Excel based on AND as well as OR logic. You will find a number of examples for different data types - numbers, dates, text, wildcard characters, non-blank cells and more.

Of all Excel functions, COUNTIFS and COUNTIF are probably most often mixed up because they look very much alike and both are purposed for counting cells based on the specified criteria.

The difference is that COUNTIF is designed for counting cells with a single condition in one range, whereas COUNTIFS can evaluate different criteria in the same or in different ranges. The aim of this tutorial is to demonstrate different approaches and help you choose the most efficient formula for each particular task.

Excel COUNTIFS function - syntax and usage

The Excel COUNTIFS function counts cells across multiple ranges based on one or several conditions. The function is available in Excel 365, 2021, 2019, 2016, 2013, Excel 2010, and Excel 2007, so you can use the below examples in any Excel version.

COUNTIFS syntax

The syntax of the COUNTIFS function is as follows:

COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…)
  • criteria_range1 (required) - defines the first range to which the first condition (criteria1) shall be applied.
  • criteria1 (required) - sets the condition in the form of a number, cell reference, text string, expression or another Excel function. The criteria defines which cells shall be counted and can be expressed as 10, "<=32", A6, "sweets".
  • [criteria_range2, criteria2]… (optional) - these are additional ranges and their associated criteria. You can specify up to 127 range/criteria pairs in your formulas.

In fact, you don't have to remember the syntax of the COUNTIF function by heart. Microsoft Excel will display the function's arguments as soon as you start typing; the argument you are entering at the moment is highlighted in bold. The syntax of the Excel COUNTIFS function

Excel COUNTIFS - things to remember!

  1. You can use the COUNTIFS function in Excel to count cells in a single range with a single condition as well as in multiple ranges with multiple conditions. If the latter, only those cells that meet all of the specified conditions are counted.
  2. Each additional range must have the same number of rows and columns as the first range (criteria_range1 argument).
  3. Both contiguous and non-contiguous ranges are allowed.
  4. If the criteria is a reference to an empty cell, the COUNTIFS function treats it as a zero value (0).
  5. You can use the wildcard characters in criteria - asterisk (*) and question mark (?). See this example for full details.

How to use COUNTIFS and COUNTIF with multiple criteria in Excel

Below you will find a number of formula examples that demonstrate how to use the COUNTIFS and COUNTIF functions in Excel to evaluate multiple conditions.

How to count cells with multiple criteria (AND logic)

This scenario is the easiest one, since the COUNTIFS function in Excel is designed to count only those cells for which all of the specified conditions are TRUE. We call it the AND logic, because Excel's AND function works this way.

Formula 1. COUNTIFS formula with multiple criteria

Suppose you have a product list like shown in the screenshot below. You want to get a count of items that are in stock (value in column B is greater than 0) but have not been sold yet (value is column C is equal to 0).

The task can be accomplished by using this formula:

=COUNTIFS(B2:B7,">0", C2:C7,"=0")

And the count is 2 ("Cherries" and "Lemons"): Counting cells with multiple criteria based on AND logic

Formula 2. COUNTIFS formula with two criteria

When you want to count items with identical criteria, you still need to supply each criteria_range / criteria pair individually.

For example, here's the right formula to count items that have 0 both in column B and column C:

=COUNTIFS($B$2:$B$7,"=0", $C$2:$C$7,"=0")

This COUNTIFS formula returns 1 because only "Grapes" have "0" value in both columns. COUNTIFS formula with identical criteria

Using a simpler formula with a single criteria_range like COUNTIFS(B2:C7,"=0") would yield a different result - the total count of cells in the range B2:C7 containing a zero (which is 4 in this example).

How to count cells with multiple criteria (OR logic)

As you have seen in the above examples, counting cells that meet all of the specified criteria is easy because the COUNTIFS function is designed to work this way.

But what if you want to count cells for which at least one of the specified conditions is TRUE, i.e. based on the OR logic? Overall, there are two ways to do this - by adding up several COUNTIF formulas or using a SUM COUNTIFS formula with an array constant.

Formula 1. Add up two or more COUNTIF or COUNITFS formulas

In the table below, supposing you want to count orders with the "Cancelled" and "Pending" status. To have it doen, you can simply write 2 regular Countif formulas and add up the results:

=COUNTIF($C$2:$C$11,"Cancelled") + COUNTIF($C$2:$C$11,"Pending") Counting cells that meet any of the specified criteria

In case each of the functions is supposed to evaluate more than one condition, use COUNTIFS instead of COUNTIF. For example, to get the count of "Cancelled" and "Pending" orders for "Apples" use this formula:

=COUNTIFS($A$2:$A$11, "Apples", $C$2:$C$11,"Cancelled") + COUNTIFS($A$2:$A$11, "Apples", $C$2:$C$11,"Pending") Another formula to count cells with multiple criteria and OR logic

Formula 2. SUM COUNTIFS with an array constant

In situations when you have to evaluate a lot of criteria, the above approach is not the best way to go because your formula would grow too big in size. To perform the same calculations in a more compact formula, list all of your criteria in an array constant, and supply that array to the criteria argument of the COUNTIFS function. To get the total count, embed COUNTIFS inside the SUM function, like this:

SUM(COUNTIFS(range,{"criteria1","criteria2","criteria3",…}))

In our sample table, to count orders with the status "Cancelled" or "Pending" or "In transit", the formula would go as follows:

=SUM(COUNTIFS($C$2:$C$11, {"cancelled", "pending", "in transit"})) A more compact formula to count cells with multiple criteria and OR logic

In a similar manner, you can count cells based on two or more criteria_range / criteria pairs. For instance, to get the number of "Apples" orders that are "Cancelled" or "Pending" or "In transit", use this formula:

=SUM(COUNTIFS($A$2:$A$11,"apples",$C$2:$C$11,{"cancelled","pending","in transit"})) Counting cells with multiple criteria_range / criteria pairs and OR logic

You can find a few more ways to count cells with OR logic in this tutorial: Excel COUNTIF and COUNTIFS with OR conditions.

How to count numbers between 2 specified numbers

By and large, COUNTIFS formulas for numbers fall into 2 categories - based on several conditions (explained in the above examples) and between the two values you specify. The latter can be accomplished in two ways - by using the COUNTIFS function or by subtracting one COUNTIF from another.

Formula 1. COUNTIFS to count cells between two numbers

To find out how many numbers between 5 and 10 (not including 5 and 10) are contained in cells C2 through C10, use this formula:

=COUNTIFS(C2:C10,">5", C2:C10,"<10") A COUNTIFS formula to count numbers between X and Y

To include 5 and 10 in the count, use the "greater than or equal to" and "less than or equal to" operators:

=COUNTIFS(B2:B10,">=5", B2:B10,"<=10")

Formula 2. COUNTIF formulas to count numbers between X and Y

The same result can be achieved by subtracting one Countif formula from another. The first one counts how many numbers are greater than the lower bound value (5 in this example). The second formula returns the count of numbers that are greater than the upper bound value (10 in this case). The difference between the first and second number is the result you are looking for.

  • =COUNTIF(C2:C10,">5")-COUNTIF(C2:C10,">=10") - counts how many numbers greater than 5 and less than 10 are in the range C2:C10. This formula will return the same count as shown in the screenshot above.
  • =COUNTIF(C2:C10, ">=5")-COUNTIF(C2:C10, ">10") - the formula counts how many numbers between 5 and 10 are in the range C2:C10, including 5 and 10.

How to use cell references in COUNTIFS formulas

When using logical operators such as ">", "<", "<=" or ">=" together with cell references in your Excel COUNTIFS formulas, remember to enclose the operator in "double quotes" and
add an ampersand (&) before a cell reference to construct a text string.

In a sample dataset below, let's count "Apples" orders with amount greater than $200. With criteria_range1 in cells A2:A11 and criteria_range2 in B2:B11, you can use this formula:

=COUNTIFS($A$2:$A$11, "Apples", $B$2:$B$11, ">200")

Or, you can input your criteria values in certain cells, say F1 and F2, and reference those cells in your formula:

=COUNTIFS($A$2:$A$11, $F$1, $B$2:$B$11, ">"&$F$2)

Please notice the use of absolute cell references both in the criteria and criteria_range arguments, which prevents the formula from being broken when copied to other cells. Using cell references in COUNTIFS formulas

For more information about the use of an ampersand in COUNTIF and COUNTIFS formulas, please see Excel COUNTIF - frequently asked questions.

How to use COUNTIFS with wildcard characters

In Excel COUNTIFS formulas, you can use the following wildcard characters:

  • Question mark (?) - matches any single character, use it to count cells starting and/or ending with certain characters.
  • Asterisk (*) - matches any sequence of characters, you use it to count cells containing a specified word or a character(s) as part of the cell's contents.

Tip. If you want to count cells with an actual question mark or asterisk, type a tilde (~) before an asterisk or question mark.

Now let's see how you can use a wildcard char in real-life COUNTIFS formulas in Excel. Suppose, you have a list of projects in column A. You wish to know how many projects are already assigned to someone, i.e. have any name in column B. And because we are learning how to use the COUNTIFS function with multiple criteria, let's add a second condition - the End Date in column D should also be set.

Here is the formula that works a treat:

=COUNTIFS(B2:B10,"*",D2:D10,"<>"&""))

Please note, you cannot use a wildcard character in the 2nd criteria because you have dates rather that text values in column D. That is why, you use the criteria that finds non-blank cells: "<>"&"" The COUNTIFS formula to count entries containing any text in one column and non-blank cells in another column.

COUNTIFS and COUNTIF with multiple criteria for dates

The COUNTIFS and COUNTIF formulas you use for dates are very much similar to the above formulas for numbers.

Example 1. Count dates in a specific date range

To count the dates that fall in a certain date range, you can also use either a COUNTIFS formula with two criteria or a combination of two COUNTIF functions.

For example, the following formulas count the number of dates in cells C2 through C10 that fall between 1-Jun-2014 and 7-Jun-2014, inclusive:

=COUNTIFS(C2:C9, ">=6/1/2014", C2:C9, "<=6/7/2014")

=COUNTIF(C2:C9, ">=6/1/2014") - COUNTIF(C2:C9, ">6/7/2014") The COUNTIF formula with 2 conditions to count dates in a specific date range

Example 2. Count dates with multiple conditions

In the same manner, you can use a COUNTIFS formula to count the number of dates in different columns that meet 2 or more conditions. For instance, the below formula will find out how many products were purchased after the 20th of May and delivered after the 1st of June:

=COUNTIFS(C2:C9, ">5/1/2014", D2:D9, ">6/7/2014") The COUNTIF formula to count dates with multiple conditions

Example 3. Count dates with multiple conditions based on the current date

You can use Excel's TODAY() function in combination with COUNTIF to count dates based on the current date.

For example, the following COUNTIF formula with two ranges and two criteria will tell you how many products have already been purchased but not delivered yet.

=COUNTIFS(C2:C9, "<"&TODAY(), D2:D9, ">"&TODAY()) The COUNTIF formula to count dates with multiple conditions based on the current date

This formula allows for many possible variations. For instance, you can tweak it to count how many products were purchased more than a week ago and are not delivered yet:

=COUNTIFS(C2:C9, "<="&TODAY()-7, D2:D9, ">"&TODAY())

This is how you count cells with multiple criteria in Excel. I hope you will find these examples helpful. Anyway, I thank you for reading and hope to see you on our blog next week!

2035 comments

  1. How can I use CountIFs function while counting the data of specific individual for a specific range of dates. Example, I have list of names in column A (from A2 to A20), their daily working hours is between column C2 to AF20 (31 days). Now I want to calculate number of days each individual did less than 5 hours shift, number of days an individual was not present in that month, total working days etc. I know I can do all these calculations for each individual at the end of the last column but I am pulling this data at another sheet and the names may not be in same order.

    Is there any other way other than CountIFs? Any help would be appreciated.

  2. I have a spreadsheet that i want to return a count across a row if two conditions are met.

    please whats the best way to write this code =if(AC3="Reject", AF3="vendor", Count(f3:Y3))

    when i wrote this code, i noticed the ones that met the condition only returned "True" instead of counting across the row, see below.

    Number of Rejects Due Supplier
    1
    TRUE
    5
    TRUE
    TRUE

    • Hi!
      If I understand your task correctly, the following formula should work for you:

      =IF(AND(AC3="Reject", AF3="vendor"), COUNT(F3:Y3))

      I hope it’ll be helpful.

      • Hello Alexander,
        Yes this was helpful, but i like to have 0 for the once that didnt meet the condition instead of "false"

        Actual expected
        false 0
        3 3
        False 0
        4 4
        1 1

  3. Hi - i am trying to count the number of dates in a date range and using a countifs formula. Such as:
    COUNTIFS(N:N,">="&B2,N:N,"<="&B3)

    Where B2 refers to Start Date & B3 refers to end date (e.g. B2 = 01/04/2021 and B3= 30/04/2021)

    It is calculating the dates but is not including the start(B2) and end date(B3) rather just the data greater to or less than the start(B2) and end dates(B3)

    Do you know how to include the data for the dates noted in B2 and B3?

    Thanks

  4. Hi , i am looking formula to rid of all the duplicates & the originals in comparision data . some duplicates starts with "."
    Just example

    Existing:
    a123.com
    .a123.com

    Comparing with
    a123.com

    I need to remove all "a123.com" . i have sheet of of 10000+ in existing & comparing have "2000+" .
    how to remove the duplicates even it have "." in starting .

    i am using the formula of -=IF(COUNTIF(A:A,A2)=1,0,1). it detecting the exact duplicates but not catching any thing with "." in starting.

  5. Hi Alexander,

    I'm trying to create a formula for this scenario. I have two columns, in each column there are only two texts that can be selected from a drop down (I'll call them "Text123" and TextABC"). I would like to create a formula that counts the total results for each for both columns, however, if "TEXT123" was selected in row 1 for both columns 1 & 2, I would only need to count it as one, not 2. How do I create a formula telling excel to count it only once per row, but for two columns total.

    Thanks so much in advance.

    • Hello!
      If I got you right, the formula below will help you with your task:

      =SUM(--(A1:B10="TextABC"))+SUM(--(A1:B10="Text123"))-SUM(--(A1:A10&B1:B10="Text123Text123"))

  6. Hi Alexander,

    My spreadsheet is quite simple, it has 3 columns.

    Column one has type of activity. (for ease of use, we can say Walk, Run & Swim)
    Column 2 has only 2 options "1st Pass" or "Not 1st Pass".
    Column 3 has a date.

    I need to have a count depending on the month & year.

    I can get each activity & whether its 1st pass or not 1st pass. Input is from Row 3 downwards.
    My problem is when I am trying to choose month = 8 & year = 2021.

    Formula just on basic Walk * 1st pass is =COUNTIFS(Applications!$A$3:$A$974,"Walk",Applications!$B$3:$B$974,"1st pass")

    I have a table which splits each activity (rows) and months (columns). I would like to return the count of 1st pass walks in each month & year? I have used Month & Year function with SUMPRODUCT, but they seem to cause issues with COUNTIFS.

    I was trying (year I am wanting to use is in C1 so I can change review previous years- in below formula looking for August in the year provided in cell C3):

    =COUNTIFS(Applications!$A$3:$A$974,"Walk",Applications!$B$3:$B$974,"1st pass",Applications!$C$3:$C$974,MONTH(Applications!$C3:$C974)=8,Applications!$C$3:$C$974,YEAR(Applications!$C3:$C974)=$C$1)

    • Messed up down the bottom:

      I was trying (year I am wanting to use is in C1 so I can change review previous years- in below formula looking for August in the year provided in cell C1):

    • Hello!
      If I understand your task correctly, the following formula should work for you:

      =SUMPRODUCT(--(A1:A10="Walk"),--(B1:B10="1st Pass"),--( YEAR(C1:C10)=2021),--( MONTH(C1:C10)=8))

      If this is not what you wanted, please describe the problem in more detail.

      • Thanks Alexander,

        I am looking to be able to return a result through countifs while searching for specific month & date within the range.

        Just say date values fill up cells A1:A10.

        How would I write a countifs formula searching for the month 8 (Aug) and year 2021?

        Thank you for your review.

        • Hi!
          The COUNTIFS function compares each value in a range against a criterion. You are comparing a date with a month number. Therefore, your COUNTIFS formula will not work.

  7. Hello ,
    Can u help me to set the below formula
    =IF(B4:B30,"Purchase Invoice",COUNTIFS(K3:K30,"1-20"))
    Thanks in advance

    • Hello!
      The IF function does not work with ranges. Please describe your problem in more detail. It’ll help me understand it better and find a solution for you.

  8. - C1 C2 C3 C4
    R1 Apr-21 Apple 10 Delivered
    R2 Apr-21 Bannana 15 Pending
    R3 Apr-21 Oranges 23 Delivered
    R4 May-21 Apple 12 Pending
    R5 May-21 Apple 45 Delivered
    R6 May-21 Bannana 27 Cancelled
    R7 May-21 Oranges 24 Pending
    R8 Jun-21 Apple 11 Cancelled
    R9 Jun-21 Apple 10 in Transit
    R10 Jun-21 Bannana 26 Cancelled

    need to filter in c1 ( apr, june), then c2 (oranges, apple), then c4 (delivered, pending); the answer should be 2

    I need countifs in single formula for above; please advise

    • Hello!
      I believe the following formula will help you solve your task:

      =SUMPRODUCT(--(MONTH(A1:A10)=4)+(--(MONTH(A1:A10)=6)),(--(B1:B10="Apple")+(--(B1:B10="Oranges"))),--(D1:D10="Delivered")+(--(D1:D10="Pending")))

      You can learn more about SUMPRODUCT function in Excel in this article on our blog.

  9. Question... I have 3 variables in 3 separate columns that I need to populate a Count for. Each variable needs to be true in order for the line to be counted. Each variable is a filtered/required criteria.

    For Example--all variables need to be true in order to be counted:

    Column A (Request Priority) Column B (Day) Column C (Hours of Operation)
    Medium Sunday After Hours
    Medium Sunday After Hours
    Critical Thursday Standard Hours
    Critical Thursday Early Hours

    Criteria Counts
    Medium, Sunday, After Hours = 2
    Critical, Thursday, Standard Hours = 1
    Critical, Thursday, Early Hours = 1

    ^Looking for a formula that provides the above output for about 400+ rows

    Thanks so much!

    • I've tried the following formulas as well:

      =SUM(COUNTIFS(CALCULATIONS!$AT:$AT, "Sunday", CALCULATIONS!$I:$I,"High", CALCULATIONS!$AX:$AX, "After Hours"))

      =COUNTIFS(CALCULATIONS!AT:AT, "=Sunday", CALCULATIONS!$I:$I, "=High", CALCULATIONS!AX:AX, "=After Hours")

      =COUNTIFS(CALCULATIONS!AT:AT,"Sunday",CALCULATIONS!I:I, "High", CALCULATIONS!AX:AX, "After Hours")

      =COUNTIF(CALCULATIONS!AT:AT,"Sunday") + COUNTIF(CALCULATIONS!I:I,"High") + COUNTIF(CALCULATIONS!AX:AX,"After Hours")
      ^This last one produces 200+ values, so it's not what I'm looking for--it's counting them all individually instead of making them all a criteria of the equation.

    • Hello!
      If I understand your task correctly, the following formula should work for you:

      =COUNTIFS($A$2:$A$100,A2,$B$2:$B$100,B2,$C$2:$C$100,C2)

      If this is not what you wanted, please describe the problem in more detail.

      • Thank you for your suggestion--unfortunately the formula isn't working. I'm pretty sure it is what I want, but it's only returning a value of "0" when it should be returning "1".

        Does the fact that it's trying to count a cell that has a formula vs. a number/text affect it?

        For example:
        1. The cells/column containing the Day is a referencing a time an date stamp but formulated to only capture the day. So the formula sitting in the cell of column "CALCULATIONS!$AT:$AT" is actually "=CALCULATIONS!B:B" with formatting changes.

        2. Also, the cells/column containing the Hours of Operation are also contain a sorting formula. "CALCULATIONS!$AX:$AX" is actually "=IF(AND(AW200>=TIMEVALUE("00:00:00"))*(AW200=TIMEVALUE("8:00:00"))*(AW200=TIMEVALUE("17:00:00"))*(AW200<=TIMEVALUE("23:59:59")),"After Hours","TBD")))" Where it then spits out the according values: "Early Hours" "Standard Hours" "After Hours".

        Is there a way for Excel and/or Google Sheets to ignore the formulas and focus on the final value? I notice that when I override the formulas for both columns and just type in the value (Early Hours & Sunday) the calculation seems to work/count properly.

        • Hello!
          I wrote this formula based on the description you provided in your original comment. Please note that if you’d provided me with a precise and detailed description of your task from the very beginning, I’d have created a different formula that would have worked for your case.
          Excel works with values that are entered into cells or returned by formulas. If the cell contains a date, and you have set the custom date format "dddd", then in the cell you will see, for example, Monday. But in fact, it is a date and not a text.

  10. Use a COUNTIFS formula to calculate Number of Product IDs by store location and product type

    Product Category Product ID Store Location Sales Revenue
    Apparel & Accessories 402850 Boston 17 $2,499
    Apparel & Accessories 436987 Boston 98 $784
    Apparel & Accessories 764613 Boston 51 $6,732
    Apparel & Accessories 243484 Chicago 32 $3,072
    Apparel & Accessories 522010 Chicago 171 $25,650
    Apparel & Accessories 346155 Chicago 51 $3,876
    Apparel & Accessories 181763 Chicago 118 $10,030
    Apparel & Accessories 410456 New York 52 $2,340
    Apparel & Accessories 454175 New York 30 $3,960
    Consumer Electronics 426853 Boston 114 $4,446
    Consumer Electronics 815098 Boston 49 $5,537
    Consumer Electronics 209537 Boston 155 $21,390
    Consumer Electronics 765870 Boston 101 $3,535
    Consumer Electronics 747542 Chicago 149 $11,324
    Consumer Electronics 177975 Chicago 119 $17,850
    Consumer Electronics 840614 New York 97 $3,298
    Consumer Electronics 271572 New York 127 $17,907
    Consumer Electronics 367240 New York 104 $12,584
    Consumer Electronics 791819 New York 91 $9,282

  11. Hi, I am trying to count the number of times a two separate strings of text appear in a column that also fall between two dates. I can get it to work if only looking for one string of text but am unsure how to look for two or more.

    For example in my 'D' column I am looking for the number of times the text 'S05' appears if it falls between the dates 01/04/2019 and 01/04/2020 in column 'F'. The formula I currently have for this is:

    =COUNTIFS($D$10:$D$32981,"S05*",$F$10:$F$32981,">=01/04/2019",$F$10:$F$32981,"<01/04/2020")

    This works but I'd also like it to count the number of times the text 'HINGED5' appears in column 'D' at the same time. Are you able to assist?

    • Hello!
      If you want to use OR logic, try this formula

      =COUNTIFS($D$10:$D$32981,"S05*",$F$10:$F$32981,">=01/04/2019",$F$10:$F$32981,"<01/04/2020") + COUNTIFS($D$10:$D$32981,"*HINGED5*",$F$10:$F$32981,">=01/04/2019",$F$10:$F$32981,"<01/04/2020")

      If you want to use AND logic, try this formula

      COUNTIFS($D$10:$D$32981,"S05*", $D$10:$D$32981,"*HINGED5*", $F$10:$F$32981,">=01/04/2019",$F$10:$F$32981,"<01/04/2020")

      This is described in the article above.

      • Thank you. I did try that formula after reading the article the first time but couldn't get it to work so I must have mistyped something. This is working perfectly for me know, much appreciated.

  12. Hi, I need to work out a formula for the following:
    I have 5 rows with different info...
    A1 = date, A2 = name, A3 = description, A4 = shop, A5 = amount.
    Now I have to add the total spent for each name and for different expenses.

    For instance, Sam has spent P500 on employment cost, P200 on production cost and P3000 on capital investment

    Sarah has spent P1000 on employment cost, P200 on production cost and P3000 on capital investment.

    Now I have to calculate only employment cost and production cost for Sarah and then seperately for Sam as well.

    How do I go about? Please help.....

    Regards

  13. I am trying to count cell-specific values using "in-cell dropdown". I am able to count each of these using the "countif" formula, but how can I assign a value to each. An example would be I have "green" with cell values of .5, 4, 1 & 8.5 and "yellow" with values of 1, 10 & 3.5. How can I add all of these numbers together, for each of the different in-cell options?

    I hope this makes sense. I have a good basic knowledge of excel and have been trying to learn more.

    Thank you!

    • Hello!
      You can sum only values written in a cell. You cannot sum possible values from the drop-down list, since this is a formula.

  14. Hello, i want to know if there is a formula that picks up first Column A is filled but Column B & C are Blank?
    Thank you

  15. Hi, I am trying to use the COUNTIFS function as below...
    Column A "start date", I want it to count all dates before 01/04/2021 but then also count in Column B "end date" all dates after 01/04/2021, there are 5 in my test sheet but it's only pulling two when I use this formula =COUNTIFS(Participants!A:A, ""&"1/4/2021")
    I need it to first count those who started before 1st April 2021 then out of those how many finished after 1st April 2021 - please help!

    • Hello!
      If I understand your task correctly, the following formula should work for you:

      =COUNTIFS(A1:A6,">"&"1/4/2021",B1:B6,"<"&"1/4/2021")

      If this is not what you wanted, please describe the problem in more detail.

      • Hi!

        Sorry the full formula didn't paste correctly in my first comment, the one you have suggested is the formula I have tried but for some reason it is only pulling 2 of the 5 entries that it should. I'm not sure where I'm going wrong. Thanks

  16. Hi

    Novice here looking for help!

    I’m looking to add up the total volume in column A of attributes in column B but only if column C contains the word scan.

    A B C D
    4 Apples Scan 1 Jan
    4 Pears Scan 2 Feb
    2 Apples 9 Feb
    2 Apples Scan 17 March
    1 Scan 21 March

    So I’d end up with:

    Apples = 6
    Pears = 4

    I also need the formulae to work if the table has been filtered. I have a column D with a date in it so if I filter the data to just show January dates for example it would have Apples = 4, Pear = 0.

    Hope that all makes sense!

    Thanks
    Dave

  17. Hi - I am trying to create a COUNTIFS to give me a total count based on 5 criteria to be satisfied. 2 of my criteria includes counting how many rows have a value <0.1% , however the formula isnt working. It works however when i use a range 0.1%-1% for example. Is this because of the signs?

  18. Hi Team,
    My Question is the expected result count = 3 which is not coming with below Query.

    =SUM(COUNTIFS($A2:$A11,{"Apples",Bananas"},$C2:$C11,{"Delivered","Pending"}))

  19. Hi,

    I have a spreadsheet containing tasks and the percentage of completing each task, I am trying to get the number of tasks which 100% completed using function CountIFS as following
    =COUNTIFS(B5:D47,"*leak test*",F5:F47,"=100%")

    each time doing that I got error #VALUE! , So Could you Please Help, Note: leak test is a repeated task

    thanks

    • Hello!
      The ranges in which the COUNTIFS function checks for values must be the same size.
      Change B5:D47 to B5:B47, C5:C47, В5:В47 .
      Pay attention to the following paragraph of the article above — Count cells with multiple criteria (OR logic)

  20. Good day! is it possible to count data in a single criteria with multiple data inputted in a cell?

    Example:
    Column 1: Gadget Ownership
    Cell 1: Laptop, Desktop
    Cell 2: Smartphone, Desktop

    • Hello!
      I’m not sure I got you right since the description you provided is not entirely clear. However, it seems to me that the formula below will work for you:

      =SUM(--ISNUMBER(SEARCH(D1,A1:A20,1)))

      D1 - criteria

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)