Comments on: 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. You will find a number of examples for different data types – numbers, dates, text, wildcard characters, non-blank cells and more. Continue reading

Comments page 8. Total comments: 2071

  1. I need your help on how the countif/s formula can help me with the sample data below:

    OMNIS ID Eval Type Week Day RPID Score Opportunity Opportunity Opportunity
    CCADA Regular Eval Week 1 Monday 10545125 90.00% 4.2 COMPLETE STATUS NOTES
    CCADA Regular Eval Week 1 Monday 10546620 100.00%
    CCADA Regular Eval Week 1 Monday 10544879 100.00%
    CLSAN Regular Eval Week 1 Monday 10548087 90.00% 4.2 COMPLETE STATUS NOTES
    CLSAN Regular Eval Week 1 Monday 10548155 90.00% 4.2 COMPLETE STATUS NOTES
    CLSAN Regular Eval Week 1 Monday 10548052 100.00%

    I have this sample data and I wanted to count the column of opportunities (3 dedicated columns) per OMINS ID per week. I tried the countifs formula but I am unsuccessful. I hope you can help me. :)

    1. Your explanation makes it hard for me to understand what you want to calculate. I'll try to guess that you need to calculate the quantity by two criteria.

      =COUNTIFS(A2:A10,"CCADA",C2:C10,"Week 1",E2:E10,"<>"&"",F2:F10,"<>"&"",G2:G10,"<>"&"")

      If that's not what you want, please tell me exactly what result you want.

      1. I tried to recreate the formula but was still unsuccessful :( I made a simple data below.

        Sample Data:

        NAME Week Opportunity
        Ken Week 1 1.1 Use of Available Resources
        Ken Week 1 3.1 File Delivery
        Ken Week 1 1.1 Use of Available Resources
        Ken Week 2 4.2 Complete Notes
        Ken Week 2 4.2 Complete Notes
        Ken Week 2 4.1 Action Taken

        I would like to see how much Ken did incur the opportunity "1.1 Use of Available Resources" on week 1. Same outcome/principle if I want to see the number of opportunities "4.2 Complete Notes" were incurred on week 2.

        I hope this helps and I really thank you for helping me :)

        1. Hi!
          I recommended you a formula in which you can specify all the necessary conditions. For example:

          =COUNTIFS(A2:A10,"CCADA",C2:C10,"Week 2",E2:E10,"="&"4.2 Complete Notes",F2:F10,"<>"&"",G2:G10,"<>"&"")

          1. I was able to recreate the formula. Thank you so much for the help :)

  2. Hi,

    I have a formula =COUNT(IF(MONTH($M:$M)=4,1)) which returns how many dates in a column are in each month (April in the example). However I want to combine this with a search in another column "=Yes". But when I am using COUNTIFS I am getting an error. So in essence I want to calculate how many lines are 'Month' and 'Yes' (where the month is currently dd/mm/yyyy). Any advice greatly received

    1. Hello!
      The COUNTIFS function cannot have only a cell value as an argument, but not a formula. Therefore, use the SUMPRODUCT function to calculate values with calculations.
      If I understand your task correctly, try the following formula:

      =SUMPRODUCT(--(MONTH(M1:M10)=4),--(N1:N10="yes"))

      1. Thank you, however I am coming up with #value!. I believe this maybe because not all the values in column M are dates. The column is linked to arrival dates and if the goods have arrived the cell states 'here'. Can I adapt the formula above to state sumproduct IF cell is date (month = 4) and column N =yes?

          1. Thank you, worked perfectly :-)

  3. Hi,

    There is my problem, it's a parking case, I have to know how in a one hour range how many cars arrive in the parking,how many leave and how many are on the parking.

    I have my Data table there is an exemple :
    Park_Time_IN Park_Time_OUT
    01/02/2022 18:54 01/02/2022 19:55
    02/02/2022 06:34 02/02/2022 08:21
    02/02/2022 07:06 02/02/2022 08:15

    And I have my Calendar table, for this period it will be :
    Date_Time_A Date_Time_B Departure_Number Arrival_Number Number_Car_in_parking
    01/02/2022 18:00 01/02/2022 18:59 ???? ???? ????
    01/02/2022 19:00 01/02/2022 19:59
    01/02/2022 20:00 01/02/2022 20:59
    01/02/2022 21:00 01/02/2022 21:59
    01/02/2022 22:00 01/02/2022 22:59
    01/02/2022 23:00 01/02/2022 23:59
    02/02/2022 00:00 02/02/2022 00:59
    02/02/2022 01:00 02/02/2022 01:59
    02/02/2022 02:00 02/02/2022 02:59
    02/02/2022 03:00 02/02/2022 03:59
    02/02/2022 04:00 02/02/2022 04:59
    02/02/2022 05:00 02/02/2022 05:59
    02/02/2022 06:00 02/02/2022 06:59
    02/02/2022 07:00 02/02/2022 07:59
    02/02/2022 08:00 02/02/2022 08:59

    All my cells have the format : Custom : dd/mm/yyyy hh:mm:ss

    I tried many formulas with countif but I didn't have a good result. Do you know which formula should I put?
    And also should I seperate in new columns Date and Time cause I don't know if I can easily comparate cells with date&time in it.

    Thanks a lot for your help

    1. Hi!
      If I understand your task correctly, the following formula should work for you:
      arrive -
      =COUNTIFS(A1:A10,">="&T1,A1:A10,"<="&T2)
      on the parking -
      =COUNTIFS(A1:A10,"<="&T1,B1:B10,">="&T2)

      T1 and T2 - time
      I hope it’ll be helpful.

  4. I need to be able to check if the cell is blank. If it's not, then check the cell for specific text. If that cell is blank, I need to check a separate cell for the same text. Any suggestions on how to do that?

    Example in words, if cell A is not blank, check cell A for "apples", if A is blank, go to cell C and check for "apples".

    1. I forgot to say, I'm checking a cell range: i.e. A2:A50 or C2:C50

  5. Hello Sir,
    I have some data that is grouped but I just want to use Countif formula on specific columns out of all the columns in grouped data, however i can't ungroup the data and use the formula. Is there any way i can use countif formula to do the same?

  6. Hi, looking to use countifs to help with a roster I'm working on. Column C = days of the week, I want the formula to count all cells containing the initials 'RT' in columns F-J if the corresponding row in column C = Friday. Have read the article above, and am trying this: =COUNTIFS($C$4:$C$49,"Friday", $F$4:J$49,"RT") but getting a #VALUE error. Would really appreciate any help, I'm not very good on Excel

    1. Hello,

      I need help developing a formula.

      I have one column with names such as Sarah, William etc between G2:G100. And a seperate column with multiple options such as completed, pending, not completed between I2:I100.

      I want to count specifically for an employee (Sarah G2:G100) who has the following answers in I2:I100 "completed" or "pending" or "blank cell" but not count the other answers.

      Tried many different formulas. Can you help?

      1. Hi!
        Try the formulas described in the article above.
        For example,

        =COUNTIFS(G2:G100,"Sarah",I2:I100,"completed") + COUNTIFS(G2:G100,"Sarah",I2:I100,"pending")

    2. Hello!
      The COUNTIFS function can only use ranges of the same size. Your data ranges have different dimensions. So use the SUM function to calculate cells where both conditions are met.
      Try this formula:

      =SUM(($C$4:$C$49="Friday")*($F$4:J$49= "RT"))

      1. That worked, thankyou soooo much :-)

  7. Hi ,i am looking for a formula helps me to count how many cells in row contains values in a special range,lets say i have a column with the values 6.24 ; 6.8; 7.24; 7.35; 7.24. How can i count the values that are from 6.0 to 6.9 and how many are from 7.0 to 7.45?

  8. I need to know how many cells in two columns meet certain criteria together. So, for BA3:BA141, ">120" and BB3:BB141, ">80", how do I get the total cells where both those critera are met? So far when I've tried, I get the count of all cells meeting one or the other added up and I need the count of the cells where both are met

    1. Hi!
      If I understand your question correctly, use the COUNTIFS function as recommended in the article above.

      =COUNTIFS(BA3:BA141, ">120", BB3:BB141, ">80")

  9. Dear Sir
    I have two columns , one column have open or closed and other column have S or L. I need formula to count open only with L

    OPEN S
    CLOSED S
    OPEN L
    OPEN L
    CLOSED L
    OPEN S
    OPEN L
    CLOSED L
    OPEN L

  10. HI can you help me, the formula when someone chooses one option in the data validation, for example THEORETICAL COURSE, OR PRACTICAL COURSE and automaticallly counts +1 as a student , in the number of students

    1. Hi! Have you tried the ways described in this blog post? If they don’t work for you, then please describe your task in detail, I’ll try to suggest a solution.

  11. I'm creating a list that has 3 sets of criteria, My formula below works fine when "Reference!$E$21" is just one value, but the column has 3 values, and I want to exclude 1.
    For example, Reference!$E$21 equals A, and the other two values are T and L. I want to keep the values equal to A and L and exclude T . what is the best way to exclude that value in the formula below?

    =IFERROR(IF(Reference!$C$1="H",INDEX('[Data!$A$3:$BR$50000,SMALL(IF(COUNTIFS(Reference!$B$16,'[Data!$U$3:$U$50000,Reference!$B$18,'[Data!$U$3:$U$50000,Reference!$E$21,'[Data!$AM$3:$AM$50000),ROW('[Data!$B$3:$B$50000)-MIN(ROW('[Data!$A$3:$BR$50000))+1),ROW(B1)),COLUMN(B1)),INDEX('[Data!$A$3:$BR$50000,SMALL(IF(COUNTIFS(Reference!$B$16,'[Data!$U$3:$U$50000,Reference!$B$19,'[Data!$U$3:$U$50000,Reference!$E$21,'[Data!$AM$3:$AM$50000),ROW('[Data!$B$3:$B$50000)-MIN(ROW('[Data!$A$3:$BR$50000))+1),ROW(B1)),COLUMN(B1))),"")

    1. Hi!
      It is very difficult to understand a formula that contains unique references to your workbook worksheets. Hence, I cannot check its work, sorry.

  12. Hi There,

    I'm looking to find a formula that takes Column A (Date) from sheet 2022-2023 + anything in Column H that contains a word (could have other words in it as well) from sheet 2022-2023 and counts it in a cell on another sheet. so basically Column A equals a certain date and if it meets that criteria, count the number of cells in column H that contains that certain word (plus could have other words in the cell)

    The closest I have to this is =SUMPRODUCT(--('2022-2023'!A:A=DATE(2023, 1,31)),--('2022-2023'!H:H="Leaders")) but its only counting the exact text where some other cells have "Leaders, Supervisors" and it won't include it.

    I've tried this too but getting an Error =COUNTIFS('2022-2023'!A:A,DATE(2023, 1,31),('2022-2023'!H:H,"Leaders"))

    Thanks for the help!

    1. Hello!
      You can determine a partial match of a word and a text string with the combination ISNUMBER + SEARCH functions.

      =ISNUMBER(SEARCH("Leaders",H1:H10))

      I hope this will help, otherwise don't hesitate to ask.

      1. Hi there,

        It didn't quite work as I'm not looking for a true/false response but more so how many cells contain that word. so for example if there are ten cells in the A column that have the same date, how many of those ten cells in the H column contain the word leaders

        1. Hi!
          This works great if you apply it to your SUMPRODUCT formula.
          For example,

          =SUMPRODUCT(--('2022-2023'!A:A=DATE(2023, 1,31)),--(ISNUMBER(SEARCH("Leaders",'2022-2023'!H:H))))

          I can't check the formula that contains unique references to your workbook worksheets.

  13. Hello, the following formula counts the number of times names from a range of cells get listed.

    =SUMPRODUCT(8*ISNUMBER(SEARCH(B51,$C$18:$P$41)))

    Is there a way to ad a seperate individual cell to the formula to be counted along with the existing range? The individual cell is N4

    1. You are awesome....I just had to change N4 to $N$4 and it worked great.

      =SUMPRODUCT(8*ISNUMBER(SEARCH(B51,$C$18:$P$41)))+(1*ISNUMBER(SEARCH(B51,$N$4)))

      Thank You so much!

    2. Hi!
      If I understand your task correctly, try the following formula:

      =SUMPRODUCT(8*ISNUMBER(SEARCH(B51,$C$18:$P$41)))+(1*ISNUMBER(SEARCH(B51,N4)))

  14. I'm sorry. For example, I have a Test A and Test B for Standard 1, as well as Standards 2 and 3. I want the Google Sheet to average the highest score from each standard. For some students, this could be the score on Test A and for others it could be the score on Test B. Is there a way to have the function select the highest of two cells and average it with other cells?

  15. I am looking for a formula that can count the highest of two columns only if the value is above 59. I have been trying different versions of COUNTIFS, but it always ends up counting all of the values that are above 59 instead of only counting the higher one if it is above 59. Is there a way to do this? I am trying to count the highest of two test grades only if it is above a 59.

    This is the last thing I tried.
    =COUNTIFS(B2>C2,[B2>59])+COUNTIFS(B259])

    Thank you for offering your knowledge.

    1. Hi!
      As it's currently written, it's hard to tell exactly what you're asking. What result do you want to get? Give an example of the source data and the expected result.

  16. Hi... I have a data where in one column there is a request I'd and on the other column there is a description of activity, e.g. updation of Address, Name, Swift, Postal etc. I want to count the occurance of unique activity with reference to request I'd. Though if there are 4 similar request I'd and activity description against it is updation of Address for 4 times in a row but I have to count them as 1 if all 4 has criteria address into it. So even if the count is 4. I want a formula to count it as 1 only. That means the order entry person worked on the same request 4 times will be considered as 1 request, but if there are other activity against the same req id, it should also show 1 count for it as well. but if the occurance of another activity is more than one it should restrict the count as 1 only.
    Kindly help with your expertise

  17. Hi!

    What if I need to know if a certain number is between 10% above or below another?

    Example:

    Seller A price: 100 | Seller B price: 110 = Seller A's price inside of 10% of seller B's price

    Is this possible with countif?

  18. Hi i have a report that has 8 sheets(by Names) which has a table of contents that i need to count based individual text. However with the countif formula, it came out as date (I.E. 1/0/1900)
    Formula as follows
    =COUNTIFS(Joel!F4:F25,"NICF019")+COUNTIF(Ivan!F4:F25,"NICF019")+COUNTIF(Amanda!F4:F25,"NICF019")+COUNTIF('Wai Loon'!F4:F25,"NICF019")+COUNTIF('Zu Yang'!F4:F25,"NICF019")+COUNTIF(Elly!F2:F25,"NICF019")+COUNTIF(Hazel!F4:F25,"NICF019")+COUNTIF(Kenneth!F4:F25,"NICF019")

    Is the formula incorrect?

      1. This works well. My formula is okay. Have change the cell to general. :D
        Million Thanks

  19. Hello,

    I have a spreadsheet where I log employee names for each day of the week, which I select from a dropdown list in each cell. Naturally there is more than one employee working some days, so I used visual basic which allowed me to list multiple variables inside the same cell. However, the cells with the multiple names are not being counted. My current formula is =COUNTIFS(C18:P41,B51:B71)

    Is there a formula that will allow me to also count the data in cells that have more than one name listed?

    1. Hello!
      Give me an example of the data of how several names are written in a cell, and what separators are used between them. Then I'll try to give some advice.

      1. The data is just names separated by a forward slash as the delimiter. Ex. John Doe / Tim Hobbs in one cell, and Jeffrey Beckham in another.
        Currently John Doe & Tim Hobbs aren't being counted,

          1. This did something totally unexpected to the totals inside my table where all the name counts were the same. Almost like it added them all together. I wanted them to be counted individually, even if they are in the same cell.

              1. For example: I need names from my table to be counted each time one appears on my spreadsheet range as shown.

                Cell 1 Cell 2 Cell 3 Cell 4 Cell 5
                Tremayne 1 Tremayne Joe Fred Richard Richard / Mathew / Joe
                Richard 4
                Mathew 2 Cell 6 Cell 7 Cell 8 Cell 9 Cell 10
                Joe 3 Tony / Erick Darrel / Joe Darrel Richard / Mathew Richard
                Darrel 2
                Fred 1

                Currently the Cells 5, 6, 7, & 9 are not being recognized because they contain more than one name separated by a forward slash.

  20. I have a project where I have a consistent range, and am trying to eliminate 10 criteria with wildcard text. i.e.:
    =COUNTIFS($H:$H,"$W$8",$K:$K,{
    "*"&$W$16&"*","*"&$W$17&"*","*"&$W$18&"*","*"&$W$20&"*","*"&$W$21&"*","*"&$W$22&"*","*"&$W$23&"*","*"&$W$24&"*","*"&$W$25&"*","*"&$W$26&"*"})
    I realise without my workbook you cannot comment on specifics, but I will be able to extrapolate from working with your produce example.

    In your example,
    =SUM(COUNTIFS($A$2:$A$11,"apples",$C$2:$C$11,{"cancelled","pending","in transit"}))
    the formula returns "3".
    My version would be trying to find instances where Apples are not cancelled not pending not in transit, which I expect would return "2".

    I cannot just count "delivered" instead, because I am trying to ascertain the number of 'anything that isn't listed'. (I am actually trying to find # "not in transit not cancelled not pending not delivered", in this example, the result would be "0").

    I cannot subtract the sum from the total because this produces a negative number (e.g. if someone included both "in transit" and "pending" in the same cell);

    I don't want to SUM a series of results, because they'd cancel each other out;
    there are no PRODUCTS to calculate because I'm dealing with text.
    But I'm also not sure a normal COUNTIFS (even with an array) would be the best way to do it

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

      =COUNTIFS($A$2:$A$11,"apples") - SUM(COUNTIFS($A$2:$A$11,"apples",$C$2:$C$11,{"cancelled","pending","in transit"}))

    2. All of my "" appears not to have shown in the original post.

      Just to reiterate, the array of 'criteria 2' in my formula need to be NOT"*"&$W$16&"*", NOT"*"&$W$17&"*", etc because I am trying to eliminate these ten categories

  21. Hi,

    I have two check boxes in a single cell. I know the simple COUNTIF formula for counting the number of checked boxes when there's only one check box option in each cell. However, I can't figure out how to do it for cells with multiple checkboxes within them. Eg. in column G rows 2 and 3 - if someone wants to check Jan in row 2 and leave Feb blank, and then in row 3 Jan is checked but Feb is blank, this would be 1 each for Jan and Feb when totaled up... but what formula can I use to tally them up?

    Any help would be much appreciated. Thank you

    1. Hi!
      The checkbox returns the value TRUE or FALSE in cell G2. Read more about it here: How to insert checkbox in Excel. Use the value of cell H2 in the COUNTIF formula, in which the formula will be written, for example =IF(G2=TRUE,DATE(2023,1,1),"")
      I hope it’ll be helpful.

      1. Thanks for your reply.

        May I ask,

        What if I have two checkboxes in the same cell, one option being AM and another being PM. How can I tally up the number of checked boxes for each option? Eg, In G2 the AM checkbox is checked and PM is unchecked, whilst in G3 the PM box is checked and AM is unchecked ... meaning the totals are AM 1 and PM 1. Which formula can I use to show these totals?

        Really appreciate any help.

        Thank you

        1. Hi!
          Two checkboxes in the same cell cannot have different values. What you're talking about are checkboxes in two different cells.

  22. Hi, am trying to build a staff rota, and want to tally the number of full weekends off eg sat Day off Sunday off.
    I can count all the days off, but I want to count only I'd they both cells say day off. So if both cells say day off it will count as 1 total. Hope that makes sence

  23. Hi,

    I have two check boxes in a single cell. I know the simple COUNTIF formula for counting the number of checked boxes when there's only one check box option in each cell. However, I can't figure out how to do it for cells with multiple checkboxes within them. Eg. in column G rows 2 and 3 - if someone wants to check Jan in row 2 and leave Feb blank, and then in row 3 Jan is checked but Feb is blank, this would be 1 each for Jan and Feb when totaled up... but what formula can I use to tally them up?

    Any help would be much appreciated. Thank you

  24. I'm struggling to make my countifs work.

    I'm using the following formula, and it's giving a zero result when I know it should be a 1
    =COUNTIFS('January 2023'!A10:A100,"C38",'January 2023'!C10:C100,"Yes")

    "C38" is what I want it to look up (a name) and January 2023 is the sheet with the raw date that needs to be displayed.
    I'm trying to find out how many times a particular name has been marked "yes" in January.

    is there something I'm missing?

    Thanks

    1. Hi!
      If you want to find the value in cell C38, don't use quotation marks.

      =COUNTIFS('January 2023'!A10:A100,C38,'January 2023'!C10:C100,"Yes")

      I hope it’ll be helpful.

      1. It worked!

        Thank you so much for your help!

  25. What if I have multiple columns to pull from with the same criteria and I need to add the sum? I'm confused do I still use the add countifs and just change coumns?

    1. Hi!
      Have you tried the ways described in this blog post? If they don’t work for you, then please describe your task in detail, I’ll try to suggest a solution.

  26. I hope you can help. I work on chevy cars. occasionally i work on a non chevy car. I am trying to count the number of cars I have worked on in a column that do not match the chevy cars listed in another column. I have this formula but it is counting the blank rows of cars i have yet to work on. =SUMPRODUCT(--(ISNA(MATCH(E3:E200,N3:N20,0))))
    This is the formula i am using for counting cars that are chevys. =COUNTIF(E:E,N19) (N19 being a Tahoe)
    Trying to change that to not equals () an array (N3:N20) just gets me an error.

    Thanks for your help.

    1. Hello!
      If I understand your task correctly, try the following formula:

      =SUM(--((IFNA(MATCH(E1:E2000,N3:N20,0)+1,1)*(--NOT(ISBLANK(E1:E2000))))=1))

      1. Thanks for your help, that works great!

  27. Good morning,
    apologies if already covered and missed but i would greatly appreciate your help to formulate the below:

    Count/sum if:
    Column A = X
    Column B = Y
    Between dates 01/01/2023 & 31/01/2023

    I can get the first two, getting the count/sum of the cells that meet the two conditions but struggling to get the date range factored in as well

    1. Apologies, the variation on this I am struggling with is also:

      Count/sum if:
      Column A = X
      Column B = Y
      if Column C = a January date

  28. Hi, I would like to ask for advice. I am currently working on a database. Is there any formula that can help me count the number of entries in a range of cell?

    Example:
    Employee X has scheduled leave dates 10, 15, 23 for January and 5, 9 for February and so on for the whole year(considering each month are separate columns)
    I would like to count the total number of days Employee X have for the whole year.

    Thank you so much in advance!

    1. Hello!
      If the column contains the number of vacation days, use the SUMIFS function to calculate the sum of days for an individual employee. If each vacation day is specified separately, count the number of days using the COUNTIFS function.
      I hope I answered your question. If something is still unclear, please feel free to ask.

  29. =COUNTIFS(LeadSource, "Google (Not Ad.)",SignedUp,"yes",Calendly!AG2:AG14,>="08/01/2022)",Calendly!AG2:AG14,>="08/14/2022)")

    How to count multiple criteria in a given set of range

    1. Hi!
      It is very difficult to understand a formula that contains unique references to your workbook worksheets. Please re-check the article above since it covers your task.

  30. Hello
    Can you please advise on how to use the COUNTIFS if I would like to calculate occurence of an individual on a rota on weekdays and weekends.

    Thank you,

  31. hi,
    what is wrong with this syntax ; if the question is ... The choices if "Teacher" or "Student" and under the category "No. Willing to Pay More (PHP 36 - 45 and PHP 46 - 55)"
    =COUNTIFS(E5:F19,"Teacher",P5:P19,"ü") note: "ü" character code in excel represents the check mark (✓) character in the column of P5:P19
    it will just display an error of "VALUE!
    while using...=COUNTIF(E5:F19,"Teacher") and =COUNTIF(P5:P19,"ü") individually has no problem at all..
    Thanks so much..Appreciate so much for your immediate response.

  32. Wonder if you guys could assist... So, i have two columns with unique identifiers, column A = unique identifier 1 and Column B = unique identifier 2... Column A is unique to a record and column B is to distinguish between multiple records so concatenating the two will result in a totally unique value. What i need is a formulae which can count how many lines which are not unique when combined. I'd rather not have another column when concatenated, can this be done in a single formulae?

    1. Hi!
      The COUNTIF function can only work with real data ranges. You can't put any other formula in it. Therefore, I cannot help you to count duplicate rows with one formula.

  33. Hello I hope you can help. I've had a read through your tutorial and a few other pages. I'm new to excel but I'm currently building an email tracker for data from Outlook. We use tags on the emails that we can count/filter by. So I can count the amount of times an agents name shows up in total, we also use tags to highlight email types eg New Task, Chase ect. The problem I'm having is that the raw data puts all these tags in the same column in excel separated by a comma.

    I have these in a table with agent name in Column A and the email job type in Row 1. If there a way for me to count the amount of times an agent name for example John Smith shows up in the same cell as an email job type for example New Task? The aim is to see how many of each type of email each agent deals with.

    1. When I say "I have these in a table with agent name in Column A and the email job type in Row 1" I mean I am trying to pull the data into a table set out this way.

  34. Hello, I tried to count all rows containing both, lets say, "Apples" in column A and "Sold" in column B. This works fine, but when I try and count rows containing both, lets say, "Apples" in column A and EITHER "Sold" in column B OR "Sent" in column C, I don't know how to do it. I tried the below, but it double counts if a row fits both the column B and C criteria:

    =COUNTIFS(A1:A1000, "Apples", B1:B1000, "Sold") + COUNTIFS(A1:A1000, "Apples", C1:C10, "Sent")

    Is there a way to do this without double counting?

  35. hi im looking for a formula on to automatically count a data if a condition is met....for example
    column1(item number) column 2 Column3
    1 store1 Pencil
    2 store2 Ballpen
    3 store2 Paper
    4 store1 Eraser
    5 Store2 Notebook
    6 Store2 paper Clips
    7 store1 Calculator

    what i want to do is i can automate it into like this
    Result1 Store1 Item no. 1, 4, and 7
    Result2 Store2 item no. 2-3 and 5 - 6

    thanks in advance

      1. big thanks

  36. This is very helpful. I'm trying to use COUNTIFS in a dynamic dropdown list formula with OFFSET and MATCH. Two out of three criteria are a date that falls between two date ranges, but the formula doesn't return the correct values when one date range is non-contiguous. This latter part cannot be helped.

    For context:
    Columns in ref sheet (TEAMS) are TEAM, MEMBER, JOINDATE, and EXITDATE
    The dynamic dropdown formula I'm using is
    =OFFSET(Table1[[#HEADERS],[MEMBER]],MATCH(1,([TEAM]=[@TEAM])*([JOINDATE]=[@DATE]),0),0,COUNTIFS([TEAM],[@TEAM],[JOINDATE],"="&[@DATE]))

    I have tested this using array and range, and also substituted COUNTIFS with SUMPRODUCT. The result has been the same.

    Thanks for your time and help!

  37. Hi, thanks for all the examples. I have a particular one that I haven't been able to figure out.
    I need to get a count of particular items that were purchased after a specific date. My example is if I have Apples, Oranges, and pears on a list and I have purchased several of these every day from Sept 1st, 2022 to Oct 31st, 2022. I want to count just pears purchased after Oct 1st, 2022. I have every purchase item listed with it's own date. I just need excel to sort this for me on an excel cell. I can do this through pivot table but this won't help me in this example.
    Thank you

  38. Hello!
    i am trying to calculate & get number of recruiters from a team who has usage >=10 per week
    =SUMIFS(DATA[Value],DATA[Folder],"AI",DATA[Delivery Lead],$D44,DATA[Date],Report!E$43,DATA[Value],">="&"10")
    I need output as
    Name | 10.10.22 | 17.10.22 (Week Start date)
    Altaf | 0 | 2 (Two employees has usage >= 10)

    1. Hi!
      It is very difficult to understand a formula that contains unique references to your workbook worksheets. Hence, I cannot check its work, sorry.

  39. I'm really Thanks to you and Very useful Information, Examples

  40. hi, how can i make a sum and countifs with mulitple criteria in cell link instead of text? for example: sum(countifs(A3:A7,{"cancelled","apple"})) now instead of using cancelled and apple, i will use cell link like A17 FOR CANCELLED AND A18 FOR APPLE. Is this possible?

    Appreciate your help! many thanks

  41. Hi! I hope you can help me I keep getting errors when I try to build this problem into IF and adding multiple => than x.

    I am trying to build a formula where I want a blank cell come back with (High, Medium, Low) when there is a specific number in another cell. For instance some types a number between these ranges for High (12 to 13 ), Medium (7 to 11), low (4 to 6)

    Hope this makes sense, please advice and your recommendation if any, thank you

  42. Hi, thanks a lot for the tips!

    Do you know how to count to meet certain criteria continuously instead of just counting overall data?
    For e.g.
    Inspection result is "PASS" for 60 batches continuously in a specific time range, instead of the normal Inspection results is "PASS" for 60 batches overall in a time range.

    Thanks in advance!

  43. I have spent hours trying to make this work. I went through your entire tutorial (which is awesome by the way!) but cannot seem to tweak your formulas to fit my needs where it actually works.

    Column M contains dates. I want to find the dates between 9/1/20 and 9/30/20.
    Column C contains text. I want to find any matches to the word deviation.
    Column E contains text. I want to find all occurrences except cancelled.
    I want to count all the instances of occurrences between that date, that match the word deviation, that aren’t cancelled.

    I have tried all of these and none work. Can you please help me?
    =COUNTIFS(Metrics!M2:M1829,">9/1/2020",Metrics!M2:M1829,"<9/30/2020",Metrics!C2:C1829,"*Deviation*",Metrics!E2:E1829,""&Cancelled)
    =COUNTIFS(AND(Metrics!M2:M1829,">9/1/2020",Metrics!M2:M1829,"<9/30/2020"),(Metrics!C2:C1829,"*Deviation*"),(Metrics!E2:E1829,"*Cancelled*"))
    =COUNTIFS(Metrics!M2:M1829,">9/1/2020",Metrics!M2:M1829,"<9/30/2020"),(Metrics!C2:C1829,"*Deviation*"),(Metrics!E2:E1829,"*Cancelled*")
    =SUM(COUNTIFS(Metrics!M2:M1829,">9/1/2020",Metrics!M2:M1829,"<9/30/2020",Metrics!C2:C1829,"Deviation",Metrics!E2:E1829,"Cancelled")
    =SUM(COUNTIFS(Metrics!M2:M1829,">9/1/2020",Metrics!M2:M1829,"<9/30/2020",Metrics!C2:C1829,"Deviation",Metrics!E2:E1829,"Cancelled")

    1. Hello!
      If I understand the question correctly, try using the "<>" sign in the condition.

      =COUNTIFS(AND(Metrics!M2:M1829,">9/1/2020",Metrics!M2:M1829,"<9/30/2020"), (Metrics!C2:C1829,"<>"&"*Deviation*"), (Metrics!E2:E1829,"<>"&"*Cancelled*"))

      1. Unfortunately that doesn't seem to work. The old "There's a problem with this formula" box comes up. It's highlighted all of the parenthesis, if that's helpful at all.

        1. Hi!
          I can't check the formula that contains unique references to your workbook worksheets. Try removing the parentheses from the formula.

          =COUNTIFS(Metrics!M2:M1829,">9/1/2020", Metrics!M2:M1829,"<9/30/2020", Metrics!C2:C1829,"<>"&"*Deviation*", Metrics!E2:E1829,"<>"&"*Cancelled*")

  44. Hi,
    Am Benson. Can you assist me with a formula to count "number of males, with ages 1 to 4, with a yes on Eligible as seen in the data below

    GENDER. AGE. ELIGIBLE
    Male 2 Yes
    Male 3. Yes
    Female 4. Yes
    Male. 5. No
    Male. 1. Yes
    Female. 3. Yes
    Male. 2. No
    Male. 3. Yes
    Female. 5. Yes

  45. Hi,

    I'm trying to create a QA scorecard for my team. I hope someone can help me.

    What I'm trying to do is that create an point system with my scorecard. Let's say that the passing QA score is 80, that would be equivalent to 30 points. Every time the QA score is deducted with 3, the points will be deducted with 2.

    Example:

    80 = 30 points
    77 = 28 points
    73 = 26 points
    70 = 24 points
    67 = 21 points

    and so on.

    1. Hello!
      Divide the reduction size by 3 and take the integer part of the number using the INT function. Multiply by 2 and get points.

      =INT((80-A1)/3)*2

      Note. 67 = 21 points - incorrect.

    2. I'm sorry, there's a mistake. It's supposed to be:

      80 = 30 points
      77 = 28 points
      74 = 26 points
      71 = 24 points
      68 = 22 points

  46. Im trying to find a formula for the following situation.
    I hope I ill be able to explain it clearly.

    1 basket contains 3 apples, 4 bananas, 7 oranges

    I would like to be able to change the basket number for example to 2 and I would like excel to calculate how many fruits I need for 2 baskets. And when I change it for example to 10 baskets it needs to tell me how many fruits I need to fill each basket.

    Thank you for your help

  47. I have a spread sheet that I copy data into from a different spread sheet that tracks quality defects of our products by Date, Model, Serial Number and Production Line. We have some products that have multiple quality issues tied to one serial number that have to be fixed and some that only have one issue.

    What I am trying to do is get the count of quality defects by date, but not to include duplicate serial number entries. The formulas below get me different parts of the issues I'm trying to track.

    The first one will get me the number of units that had defects that particular day, but it won't exclude the duplicate serial entries.

    =COUNTIFS(X2:X1800,"="&DATE(2022,8,22))

    The second formula will get me the number of non repeating serial numbers but isn't able to be constrained to a certain date.

    =SUM(IF(FREQUENCY(IF(LEN(AE2:AE1800)>0,MATCH(AE2:AE1800,AE2:AE1800,0),""),IF(LEN(AE2:AE1800)>0,MATCH(AE2:AE1800,AE2:AE1800,0),""))>0,1))

    So I am needing to figure out a way to combine the formulas so that I can use the same formula in multiple cells but have different dates.

  48. This Fomula is giving me a Spill error.

    =FILTER(A2:A500>="9/1", A2:A500<="9/30")*(COUNTIFS($E$2:$E$500,"*ER*",$I$2:$I$500,"EOU"))

    What I am trying to do is in Colum A I have Sept, Oct and Nov dates, which is our Quarter1. Then I have other columns which have drop downs in them (column E and I). So what I need to do is be able to filter these 2 COUNT IFS criteria, by month. And break it out my months within the Quarter 1 spreadsheet tab.

    Any assistance would be greatly appreciated!

    1. Hello!
      The #SPILL! error occurs when a formula cannot return an array of values to a worksheet. It is possible that the cells already have some values. For more information, please read: Excel #SPILL! error - causes and fixes. I hope I answered your question. If something is still unclear, please feel free to ask.

  49. Hello, I've been struggling with this for some time. I have two sheets.

    One sheet has: Sheet two:

    COL A|COL B |COL C COL A| COL B| COL C
    Player|Week|Points and the other has Name|Name|Both

    Objective is to match names in COL A and B from sheet two to COL A in sheet 1.
    However the criteria must be-
    COL C(Points) must be greater than 26 for the name in COL A( sheet 2)
    COL C(Points) must be greater than 20 for the name in COL B(sheet 2)
    Both of the above criteria must have been met on the same date.

    Any help would be greatly appreciated. the current formula i was trying is:
    =COUNTIFS(Table2[FDPoints],">=26",Table2[Player],B75,Table2[Week],10/10/2021)/2+COUNTIFS(Table2[FDPoints],">=20",Table2[Player],F75,Table2[Week],10/10/2021)/2

      1. Thank you.

        So this formula will give me almost what I am looking for:
        =COUNTIFS(Table2[Player],[@QB2],Table2[FDPoints],">=26",Table2[Week],"=9/11/2022")+COUNTIFS(Table2[Player],[@RB],Table2[FDPoints],">=20",Table2[Week],"=9/11/2022")

        However if one name meets the criteria, it still adds the value. How can I made it add nothing if both names do not match there set criteria.

        Example:
        1 player has 26 points or over, the other player has 20 points or over. If both are not met, then it does not add.
        Currently, if player[QB2] has over 26 points, and player 2[RB] has less than 20, it will return: 1
        If both players meet criteria, it returns 2.
        I would like for it to be counted as 1 if both criteria is met, but not to count if both are not.

        Thank you!

          1. That works perfectly. Now my data contains 18 different dates. Any way to add them up without making a long formula as it will freeze excel if over so many characters?

            =IF(AND(COUNTIFS(Table2[Player],[@QB2], Table2[FDPoints],">=26",Table2[Week],"=9/11/2022")>0, COUNTIFS(Table2[Player],[@RB], Table2[FDPoints],">=20",Table2[Week],"=9/11/2022")>0),1,0)+IF(AND(COUNTIFS(Table2[Player],[@QB2], Table2[FDPoints],">=26",Table2[Week],"=1/9/2022")>0, COUNTIFS(Table2[Player],[@RB], Table2[FDPoints],">=20",Table2[Week],"=1/9/2022")>0),1,0)+IF(AND(COUNTIFS(Table2[Player],[@QB2], Table2[FDPoints],">=26",Table2[Week],"=1/2/2022")>0, COUNTIFS(Table2[Player],[@RB], Table2[FDPoints],">=20",Table2[Week],"=1/2/2022")>0),1,0)

            etc.
            Thanks again

            1. It is actually working great. Thanks for your help!

  50. we have data in column like
    AOHO001
    AOHO002
    AOU1003
    AOU2004
    AOU3005
    AOU1006
    AOU2007
    AOHO008
    we have to count how many no. are AOHO

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 :)