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
by Svetlana Cheusheva, updated on
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 6. Total comments: 2052
Hi,
Is it possible to tag a progress with each cell containing different data?
The information will be tagged as "complete" if either "email", "mobile no.", or "address" is provided. It does not necessarily need to have all the information (at least one of the 3 should be fine)
Thank you!
Steve
Hello! To find a partial match of text in a cell, use these instructions: How to find substring in Excel
If a single match is sufficient, use the logical OR function. For example:
=IF(OR(ISNUMBER(SEARCH("address", A2)), ISNUMBER(SEARCH("email", A2))),"complete","")
Hi Alex... Im suffering here...
I need to count how many F there are in multiple colums
If I count the "F" in one column, works great:
=COUNTIFS(A:A,"JUNE",B:B,"F")
but what i really need is to count the "F" in multiple columns:
=COUNTIFS(A:A;"JUNE",B:K,"F")
and it doesnt work, what am I doing wrong? is there a way I can do this?
any help, will be appreciated.
thank you! claudia
Hello! All the ranges you use in the COUNTIFS function must be the same size. That's why your formula doesn't work. I recommend reading this article: Excel COUNTIF and COUNTIFS with OR logic.
Here's an example of the formula:
=COUNTIFS(A:A,"JUNE",B:B,"F") + COUNTIFS(A:A,"JUNE",C:C,"F") + COUNTIFS(A:A,"JUNE",D:D,"F")
oh... got it..that is what i was afraid of... i didnt want to make the formula too long...
thank you so much, let me check that part of the article again!
thank you, Alex!!
I have list of trainings in rows and completion status in columns against the resource. How can I use COUNTIF formula to see number of resources who have completed / in progress for each training? Kindly help
If the formulas and examples in the article above don't work for you, give an example of the source data and the desired result.
is something like this possible?
IF(COUNTIFS(R2,"value1*",S2,"status1"),"aaa","bbb"),IF(COUNTIF(R6,"value2*"),"aaa","bbb")
or
IF(COUNTIFS(R2,"value1*" OR "value2",S2,"status1" OR "status2" or "status3"),"aaa","bbb")
Thanks
Your formulas cannot work. Please study the examples in the article above, and also these manuals: COUNTIF function in Excel - count if not blank, greater than, duplicate or unique and Excel COUNTIF and COUNTIFS with OR logic.
Why do I get an error message with th3 following excel formula?
=IF( COUNT(B90:C90)=2,MOD(C90-B90,1)*24,0)
The error message only shows up after the date is added in Column A. Start time is column B and end time is column C.
Thank you!
Hi! I can't check your formula because I don't have your data. An error is possible if the cells contain text but not time. Also, I can't guess which error message you see. Note that there is no reference to column A in the formula.
Hello Dear Team,
I have an question that is possible to count three or four things with a single formula against every value as shown in the data:-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 P H A L s/l
P P P P P H P P P P P P H P L L P P P H P a a P P P H S/L S/L P P 21 4 2 2 2
Hi! Unfortunately, this information is not enough to understand what you need.
i want to count total no. of P,H,A,L and s/l with a single formula from the given data.
Hi! If I understand the question correctly, the formula might look something like this:
=SUM(COUNTIF(A1:T1,{"P","H"}))
Thanks a lot Sir,
Actually I want to count all P in column "P"
Count of all H in column H at the end and all L,S/l in their respective column simultaneously with a single formula
e,g: total P=24
Total H=5
Total L-3
Total S/l=2
Hi! If I understand your task correctly, use a separate COUNTIF function for each column. For example,
=COUNTIF(H1:H100,"H")+COUNTIF(P1:P100,"P")
Thank you so much, I coundn't remember how to use more then one formula on the same cell and somehow this was the only post that used the + to help me count more then one different word into the same cell.
Hi alexander,
I have two column of products and I need to find out if a certain brand of a retailer is offered at the other retailer in the other column. Offered by 'retailer ' 'yes' = 1, if not offered then = 0
is it possible to find out if a brand is offered in the other column without using a specific wildcard? otherwise the wildcard will have to be changed per product and this would not be possible.
Hi! We have several instructions on how to identify duplicates in two columns: VLOOKUP to compare two columns in Excel for common values and How to compare two columns in Excel for matches and differences. I hope this will help, otherwise don't hesitate to ask.
Hi, I got small problem.
I cannot find a way to formulate a suitable formula. I hope you can help me.
I have to count how many of the people who worked on the DON project were between the 16 and 24 years, male, from China. I need to include all of this as of 12/31/2015. Most important is fact that some of people quit work before that date so I need to exclude them.
Start of contract is between C3 to C100, end of contract D3 to D100, Birth date E3 to E100, country of residence is F3 to F100, project name is G3 to G100, gender I3 to I100.
I made it as per the formula below, but I don't know how to count the age bracket correctly (between 16 and 24 years) and eliminate people who finished work before this date (12/31/2015).
=COUNTIFS(C3:C100, "<=12/31/2015", F3:F100, "China", G3:G100, "DON", I3:I100, "M", )
TIA John
Hello!
The COUNTIFS function cannot use other functions or formulas as arguments. Therefore, I recommend using the SUMPRODUCT function.
=SUMPRODUCT(--(C3:C100<=DATE(2015,12,31)), --(F3:F100="China"), --(G3:G100="DON"),--(I3:I100="M"), --(DATEDIF(E3:E100,TODAY(),"y")>=16), --(DATEDIF(E3:E100,TODAY(),"y")<=24))
You can also find useful information in this article: How to calculate age in Excel.
Hi Alexander,
Im a new user, how do I express eg that the Yes must relate to the occurrences of LS rather than any Yes that appears in the column.
=COUNTIF('Action Log'!G23:G83,"LS")-COUNTIFS('Action Log'!I23:I83,"Yes")
TIA Karen
Hi! If both of your conditions must be met simultaneously, use the COUNTIFS function to calculate the quantity of values. Read this article above.
Try this formula:
=COUNTIFS('Action Log'!G23:G83,"LS",'Action Log'!I23:I83,"Yes")
I am trying to incorporate wildcards into a COUNTIFS with three criteria because the data is coming from a sharepoint and sometimes includes date and time and sometimes only date and I need to look only at dates. So far this is what I have.
=COUNTIFS('WT Outflow Import'!B:B,$B$4,'WT Outflow Import'!A:A,C18,'WT Outflow Import'!C:C,$B$6)
B6 is the cell containing the date.
The above formula returns what I need if there is no time present with the date in the cell. Otherwise it returns nothing as expected. I need the value matches regardless of whether there is date/time or just date. This is a sharepoint connection, so I don't have the luxury of just changing the data.
I tried using a wildcard and it also returns nothing.
=COUNTIFS('WT Outflow Import'!B:B,$B$4,'WT Outflow Import'!A:A,C18,'WT Outflow Import'!C:C,$B$6&"*")
Any idea where I am going wrong here?
Hi! To use only the date and ignore the time, round up the date and time to a integer number. For example, using the INT function: as INT($B$6)
Is it because the column where I am parsing using the wildcard is a date (number)?
Hi there, I am trying to program a workbook to pull data from different sheets and am hitting a roadblock in trying to program my COUNTIFS formula with multiple criteria.
I am pulling survey data and am looking at the number of compliments per city. In this instance, I have it programmed to pull the comment number that are compliments and from the city, but where I am running into trouble is that the city field comes back to me and can reflect the city of North Fort Myers as "NORTH FORT M" and "N FORT MYERS".
I am trying to figure out how I can program it so both of these are picked up for the same total number. I currently have my formula as =COUNTIFS(Test!O:O,List!W2,Test!D:D,List!C2). But for the data in column D, I want it to be pulled if it reflects the info from cells C2 and D2.
Hoping this is clear and you can help! Thanks.
Hi! Unfortunately, the COUNTIFS function cannot calculate approximate matches. To use the formulas, correct the typos. You can use the Find Fuzzy Duplicates tool to do this. It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.
Hi Alexander,
I'm trying to use Countifs with Text.
I have a column with Girls attending classes. In that column I write yes or No.
I then would like to calculate or create a formula in a separate column, that if that specific cell says "Yes" it would allow the formula to occur if it says "No" it would just appear as £0.
Hoping you can help me.
Thanks
Hello! I don't really understand what result you want to get. If you want to count the quantity "Yes", use the COUNTIF function: COUNTIF(B2:B10,"Yes")
If you want to calculate a formula by condition, use the IF function.
Is this also possible to occur with a Dropdown with either yes or no? And How would I allow the formula to occur or have it cancel it out if it say no.
Thanks
Hi Alexander,
What would be the formula for the following example:
Column A has three entries "house", "bungalow" or "flat". Column B has the 'area' of the building. I want to calculate the total area when Column A has either "house" or "bungalow" entered.
I hope this makes sense!
Thanks :)
Hi! The following tutorial should help: Excel SUMIFS and SUMIF with multiple criteria – formula examples.
For example,
=SUMIFS(B1:B10,A1:A10,"house") + SUMIFS(B1:B10,A1:A10,"bungalow")
Hi, I am trying to total how many times a participant has attended a class over a 6 week period. I have Column A containing the names of participants, column B containing the date attended. These participants names listed in column A are repeated in alot of cases as they might attend multiple times over this period. I am wanting to lookup column A, find the exact same names/search criteria and return a total "number" for the sum of how many times their name appears over this period. This would then tell me that "Joe Blow" attended this class 20 times over a 6 week period. Thank you. Ruth :-)
Hi! I hope you have studied the recommendations in the tutorial above. It contains answers to your question. Here is an example formula for your case:
=COUNTIFS(A1:A100,"Joe Blow", B1:B100,"<"&TODAY(), B1:B100,">"&(TODAY()-42))
Hi,
I have 2 columns. Column A shows the time and Column B indicates if a button is pushed with 1='button pushed' and 0='button not pushed'. i need to measure the time between every button push (or the number of cells between each '1' because each cell is equal to 1 minute) but the data spans over 2 weeks (=20 000++ cells). is there a way to make a list of the duration for every "downtime" (time between every button push) without doing them one by one?
for example, collumn B would look something like this:
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,....
so the first downtime is 22 minutes, second downtime is 6 minutes, third downtime is 18 minutes and so on.
thanks in advance!
Hi! If I understand your task correctly, the following formula should work for you:
=SEARCH("#",SUBSTITUTE(CONCAT($B$1:$B$3000),"1","#",ROW(A2))) - SEARCH("#",SUBSTITUTE(CONCAT($B$1:$B$3000),"1","#",ROW(A1)))-1
Copy this formula down along the column. I hope this will help.
Thank you so much! it works wonderfully!
I changed the '3000' in '$B$3000' to the number of the final cell.
why do we need to use ROW(A1)? I substituted it with 1,2,3,.... and it work just fine, but your method also work. what is the difference?
If you copy the formula down along the column, the value of ROW(A1) will automatically change and return 1,2,3...
Ok everything is clear now! thanks again!
I need help in my file as per below sample.
I have multiple items, some are with same "PCA P/N" and some are not same and it has different date reject each PCA P/N recorded.
Then, what I need is to count the specific PCA P/N which still "OPEN" status and with less than 30days from now.
Another column and formula is for less than 60 days, and next is less than 90days from now.
For example the Date Reject is at column A:A, PCA P/N is at column B:B and the status is at column C:C.
Date Reject PCA P/N STATUS
5-Aug-22 AEM5300-66402 open
Hope you guys understand my statement.
Hi! If I understand your task correctly, try the following formula:
=SUM(((TODAY()-A1:A20)<30)*(B1:B20="AEM5300-66402")*(C1:C20="open"))
or
=SUMPRODUCT(--((TODAY()-A1:A20)<30),--(B1:B20="AEM5300-66402"),--(C1:C20="open"))
For more information, please visit: Excel SUMPRODUCT function with multiple criteria - formula examples.
Thanks for your response. But after I've tried, this is the results.
for this one -> =SUM(((TODAY()-A1:A20)<30)*(B1:B20="AEM5300-66402")*(C1:C20="open")) results shows "0".
and for the 2nd formula shows #VALUE!.
I'll check on your link provided for more other info.
Thanks again.
I wrote this formula based on the description you provided in your original comment. I can't see your data and can't know what dates you are comparing. Also check the dates in column A. If it's text and not dates, the formula doesn't work. Please note that if you’d provided me with the 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.
Hi Sir,
Appreciated your response and thank you.
Actually the output should be like this.
Model <30 days <60 days <90 days 120 days
M5300-66401 8 3 1 0 3
Everyday it will count those within 30 days from today, those within 60days from today and so on.
Those status still "open", and yes the column A is formatted as date.
By right your formula will work but i don't get it also why having error.
Hi! Your answer does not contain any new data that would help give you advice. Check column A. I think it contains text that is formatted as a date. Pay attention to the following article: How to convert text to date in Excel.
I'm checking the error and evaluate the formula shows the date is "45072-A1:A20".What do i need to change or format?
Hi, Please help with the below formula.
The top performer's indication with a yes or no is in column "L". Country is in column X. Now I would like to understand the % of top performers in the United Kingdom and Ireland countries. Used the below formulae but couldn't get the correct %. Please help.
=COUNTIFS('Successors List'!L:L,"Yes",'Successors List'!X:X,"United Kingdom","Ireland")/COUNTIF('Successors List'!L:L,"Yes")
Hi! Pay attention to the following paragraph of the article above: How to count cells with multiple criteria (OR logic).
It covers your case completely.
COUNTIFS('Successors List'!L:L,"Yes",'Successors List'!X:X,"United Kingdom") + COUNTIFS('Successors List'!L:L,"Yes",'Successors List'!X:X,"Ireland")
Hi, Many many thanks for responding. I've used the formula already. However, it shows 3000% which is weird. Do you know why is it not giving the right %?
I can't check your formula because I don't have your data.
* To clarify, the "Successors list" is the top performers list in the Excel file.
Hi!
Would love some formula help here, if possible.
Sheet 1: Customer email (column A), Survey completion date (column B)
Sheet 2: Customer email (column A), Order date (column B), Unique order # (column C)
On Sheet 1 in column C, would like a formula to count quantity of unique orders on Sheet 2 by customer email BEFORE OR ON the survey completion date
Is this something you could help me with?
Hello!
If I understand your task correctly, the following formula should work for you:
=SUM((COUNTIFS('1'!A1:A10,'2'!A1:A10,'1'!B1:B10,">="&'2'!B1:B10)))
Hi Alexander,
I follow your topics and website. You are genius of solving the problems. And you help me many times here.
My question is:
I have one cell A1. Every week in this cell is entering one of this letters ("A", "B", "C","D") from another sheet. . I want to count this letter and multiply by different number.
For Example: countif(A1,"A")*13.75 ........... countif(A1,"D")*2.75 ............ countif(A1,"C")*5.5 ............... countif(A1,"B")*8.25
I want to put this in one formula.
Thank you
Hi! You can get a number depending on the value of the cell using the IFS function.
IFS(A1="A",13.75,A1="B",2.75,A1="C",5.5,A1="D",8.25)
But I'm not understood what result you want to get and why you should use COUNTIF in the one cell.
I thought that I have to use countifs, because i have multiple criterias. Also think about IF with OR. But couldn't put together.
Thank you for quick response.
Result is based on £. For example: if in that cell A1 is D, then I want to be multiplied by 2.75£. People are receiving bonuses for their hard work.
I make setup with your formula IFS and this solve my problem.
Thank you very much.
how can i count total number of unstanding payment for one registration number ( different pay rate) from different worksheet( one worksheet for one month) for the whole year.
Hi! Create a COUNTIFS formula for each sheet separately, and then sum them up.
Maybe this article will be helpful: Excel reference to another sheet or workbook (external reference)
Hi,
Could you please help to solve below problem?
I just need to get the result with count of text from two columns in a particular range whether the values are same for both cells or different in both cells, the values shall be counted as one only.
Example:
A B
Apple Orange
Orange Mango
Apple Orange
Apple 2
Orange 3
Mango 1
Hi! To count the number of values by condition, use COUNTIF function and this guide: COUNTIF function in Excel - count if not blank, greater than, duplicate or unique.
For example:
=COUNTIF(A1:B6,"apple")
Sorry, a change in example:
A B
Apple Apple
Orange Mango
Apple Orange
Apple 2
Orange 2
Mango 1
=SUM(COUNTIFS($A$2:$A$11,"apples",$C$2:$C$11,{"cancelled","pending","in transit"}))
how we write like this
=SUM(COUNTIFS($A$2:$A$11,"apples",$C$2:$C$11,{"="&H1(Like),"="&H2(Like), "="&H3(Like),"="&H4(Like)}))
Hi! Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Hi
I'm looking at calculating the count of employees who belong to the United Kingdom and Ireland. But I need to calculate just within 4 cells and not more.
The country is in the AF column, and I need to look at the formula calculating no. of employees who are in the UK and Ireland in 2 different time frames.
Used the below formula but is not working. AF52:AF53 is one time frame and AF57:AF58 is another timeframe.
=COUNTIFS(AF52:AF53,"United Kingdom",AF57:AF58,"United Kingdom") + COUNTIFS(AF52:AF53,"Ireland",AF57:AF58,"Ireland")
Please help!!!
This may help.
=COUNTIFS(AF52:AF53,{"United Kingdom","Ireland"})+COUNTIFS(AF57:AF58,{"United Kingdom","Ireland"})
Hi! I can't check your formula because I don't have your data. Note, however, that the COUNTIFS function only counts when, for example, AF52=AF57="United Kingdom"
Hi,
How do copy the formula to another cell with skipping AZ-BA (2 Columns) of data.
=COUNTIFS(AV$6:AV$75,"12x12",AW$6:AW$75,"Prep")+COUNTIFS(AV$6:AV$75,"12x12",AX$6:AX$75,"Prep-c")+COUNTIFS(AV$6:AV$75,"12x12",AY$6:AY$75,"Prep")
into
=COUNTIFS(BB$6:BB$75,"12x12",BC$6:BC$75,"prep")+COUNTIFS(BB$6:BB$75,"12x12",BD$6:BD$75,"Prep")+COUNTIFS(BB$6:BB$75,"12x12",BE$6:BE$75,"prep")
Hi!
I recommend reading this guide: How to copy formula in Excel with or without changing references.
Hi,
I have this table with list of names and 3 columns for the status. The reference is from another sheet. i used countifs with 2 conditions and working except for 2 names, that returns the value of 0. I checked the reference and they should value greater than 0. I tried it also in google sheet and got the same result. Also, tried changing the format but no changes. Hope you can help. Thank you.
The formula is like this
=COUNTIFS(Sheet2!A:A,A2,Sheet2!B:B,B1)
Hope you can help. Thank you.
Can anyone
Hi! I can't check your formula because I don't have your data. It is possible that your values have extra spaces, unprintable characters, or decimals that are hidden by the number formatting.
Hi! I would like to ask about, what formula is the best for this situation:-
COLOUMN A : Name of officer
COLOUMN B : Name of officer
COLOUMN C : Numbers of day taken to complete the task
Reason why there are two column is the task need to 2 officers to be completed. So the question is, how do I want to count if the officer (e.g Lisa) has completed her task less than 7 days.
Thank you.
Hi! You can use the COUNTIFS function to calculate an sum for several conditions. Use this guide: How to use Excel COUNTIFS and COUNTIF with multiple criteria.
It is not possible to give more detailed advice since you have not provided any data.
I need some help! I am an OB provider and in the last 6 years, my male-to-female fetus ratio is 2:1 (which is wild). I am trying to see if the sex discrepancy is the strongest based on specific indications (such as mothers over 35 or patients I saw due to sonogram anomalies). I have my indications (the reason they saw me) in one column and male or female in another column. I use this [COUNTIF(F:F, "(u/s)*")] to indicate patients that were seen due to sonogram anomalies and [COUNTIF(I:I,"*male*")] to indicate all male fetuses.
Can I combine the two and see whether the indication changes the sex ratio?
Hello!
If I understand your question correctly, try using the COUNTIFS function to count values for the two conditions:
COUNTIFS(F:F, "(u/s)*", I:I,"*male*")
Look for the example formulas here: Excel COUNTIFS and COUNTIF with multiple AND / OR criteria.
Hi Alexander!
Thanks for your blog, it's very useful. I had a question, I hope you can help me. I would like to count how many cells in a column contain simultaneously certain words (not just one word, as CTRL+F would be enough). Let me explain better.
I'm doing a list of magazine articles that talk about several topics, I'm classifying them. For example, let's say I have 50 articles, one listed under the other (in 50 rows), and categorized through 4 criteria (columns): theme of the Article (column A), Author (column B), Title (column C), Editor (column D).
The important one is Column A, where I list the topics each of the articles talks about. So in each cell of Column A, for each article, I put certain keywords separated by commas. Example:
column A (Topics present in the article) column B (author) column C (title) column D (editor)
Row/article 1: food, travel, social media, money XXXXX XXXXX XXXXX
Row/article 2: food, money, tourism XXXXX XXXXXX XXXXX
Row/article 3: travel, food, sustainability
Row/article 4: social media, money, travel
Row/article 5: sustainability, food, social media
QUESTION: How many cells of column A contain both "food" and "travel"? Or both "travel" AND "money" AND "food"?
I would like to know many articles talk about several topics at the same time, so how many times certain keywords are mentioned simultaneously within the same cell. For example, how many articles talk about both food and travel (how many cells of column A contain both "food" and "travel")? How many articles talk about both money and social media (how many cells of column A contain both "money" and "social media")? And even three topics simultaneously.
Thanks in advance for your help!
Take care,
Hi!
Find a partial match of the text strings using the SEARCH function.
=SUM(--ISNUMBER(SEARCH("food",A1:A20))*(--ISNUMBER(SEARCH("travel",A1:A20))))
For more information, please read: How to find substring in Excel
Thanks for your answer!
Maybe I didn't understand something because when I try to apply the formula to the desired column it doesn't show the correct results. For example I know for sure at least 5 cells contain simultaneously two certain words, and still the formula tells me only one cell does, or none.
I mean, does it count how many cells IN TOTAL in a certain column contain at least the words used in the formula, or the formula just works for each cell individually? Sorry forr my question, I'm not that familiar with Excel.
Thanks again,
Hi!
The formula counts how many cells in the range contain 2 words at the same time. I can't see your data, but the formula works for me.
Hello there!
Yes, indeed the formula works, thanks! The only issue is the range. Instead of giving me the results for the whole range (like 10 articles in total mentioning X and Y), it only works for individual cells: I have to drag the formula down, in paralel to the column with the keywords I want to count, and it gives a list of results per cell (like 0, 0, "1", 0, 0, "1", 0, "1", etc.), not the total of the range ("3"). I don't understand why.
So I then have to sum the whole column of results to have the total number of articles mentioning the chosen words. It's like the "extracting part" works, indentifying the words, but the "sum part" doesn't for the whole range, only for individual cells.
I could send you a part of the file as an example or screenshots, no problem.
Thanks again!
Dear Alexander,
Sorry to bother again, I think found a SOLUTION, I wanted to let you know in case future users find it useful.
I simply modified your formula a little bit, changing the =sum with =sumproduct. This way it shows the final results for the whole range of interest in a single cell:
=SUMPRODUCT(--ISNUMBER(SEARCH("KEYWORD1",A:A))*(--ISNUMBER(SEARCH("KEYWORD2",A:A))))
Do you think there is a way to see highlighted the results? I mean, not just knowing the number of cells that contain specific keywords, but also knowing which ones in order to find the articles of interest.
Thanks again for your time, it's incredible how helpful you are and I definetively save this page.
Have a nice day!
Hi! To get cell values that contain specific keywords, you can use the FILTER function. The following tutorial should help: Excel FILTER function - dynamic filtering with formulas.
Hi,
I wonder if you could help me. I have table need to find the correct formula to use,
i want to count the duplicate with multiple creteria.
example :
time date customer Flavour number invoice
2:43 am 07/04/2023 linda jitsu 123
2:44 am 07/04/2023 linda Belt 456
2:45 am 07/04/2023 Henry Belt 789
2:45 am 07/04/2023 Henry Belt 897
2:45 am 07/04/2023 Henry jitsu 456
2:46 am 07/04/2023 Henry Belt 789
how we use countif for flavour Jitsu will show duplicate if more than 1 time entry and for flovour Belt will show duplicate if more than 3 times entry?
Hoping for your help in this matter .
Thank you very much
Best Regards
Hi!
If you want to show products that meet more than 3 times, try the methods suggested in this guide: How to find duplicates in Excel.
For example:
=IF(COUNTIF($D$2:$D$8, $D2)>3, "Duplicate", "")
Hi, I have 2 different set of list boxes 1) Overall, Ops, Apps 2) Overall, CR, BF, AT
KPI Oct-22
TTM 0
As mentioned in the above, i would like to calculate TTM count using above list box combinations. Could you please help
Have you experimented with the suggested techniques in the blog post? If they weren't effective, please provide me with more details about your task, and I'll do my best to recommend a solution.
I'm working on a spreadsheet where the COUNTIF formula was pulling from a local desktop so the formula is now giving me a "REF" error since that employee is no longer here. I can see where I can change the path of the formula but unsure what Table2[#Data],"Administration" is coming from. As I don't see any tables to reference on that report when generated.
=COUNTIF('C:\Users\employee\Downloads\NewHireReport (20).xlsx'!Table2[#Data], "Administration")
If you don't know what Table2[#Data],"Administration" is coming from, how should I know?
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. :)
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.
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 :)
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,"<>"&"")
I was able to recreate the formula. Thank you so much for the help :)
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
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"))
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?
Hi!
To ignore errors, replace them with 0 using IFERROR function.
=SUMPRODUCT(--IFERROR(MONTH(M1:M10)=4,0),--(N1:N10="yes"))
Thank you, worked perfectly :-)
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
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.
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".
Hi!
Try to use the recommendations described in this article: Excel Nested IF statements - examples, best practices and alternatives. If I understand your task correctly, try the following formula:
=IF(NOT(ISBLANK(A3)),A3="apples",IF(NOT(ISBLANK(C3)),C3="apples",""))
I forgot to say, I'm checking a cell range: i.e. A2:A50 or C2:C50
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?
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
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?
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")
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"))
That worked, thankyou soooo much :-)
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?
Hi!
Please re-check the article above since it covers your case.
=COUNTIFS(A1:A10,">6",A1:A10,"<6.9")
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
Hi!
If I understand your question correctly, use the COUNTIFS function as recommended in the article above.
=COUNTIFS(BA3:BA141, ">120", BB3:BB141, ">80")
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
Hi!
Use the COUNTIFS function as described in the article above. For an example, see Formula 2.
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
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.
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))),"")
Hi!
It is very difficult to understand a formula that contains unique references to your workbook worksheets. Hence, I cannot check its work, sorry.
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!
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.
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
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.
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
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!
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?
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.
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
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?
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?