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 18. Total comments: 2071
I'd appreciate any help or insight.
Use Case: Get count of multiple criteria from different columns
Criteria1: =COUNTIFS('Sales Report'!$G:$G,"Damy Dams",'Sales Report'!$H:$H,"Nov",'Sales Report'!$I:$I,{"Movies","Music"}),
Criteria 2: 'Sales Report'!$E:$E, {"Offline","Onsite","Podcast"})
My formula returned the count for Criteria 1 BUT does not return the count for Criteria 2
How can I combine all into one statement?
For example: =SUM(Criteria1,Criteria2)
AND NOT
=SUM(Criteria1+ SUM(COUNTIFS(Criteria2)…. this gives a much higher count value and is not the requirement.
Hello!
Use the formula for Criteria2
=SUM(COUNTIFS('Sales Report'!$E:$E, {“Offline”;”Onsite”;”Podcast”}))
I hope it’ll be helpful.
Hi,
I need following assistance from you guys.
In my data table column A = code number and column B = name.
If code number in column A is same, that has to be count as one only.
Count result should be Reza = 2, Jonny = 1, Rony = 2 & Bony = 1.
Code Name
438 Reza
438 Reza
438 Reza
438 Reza
438 Reza
438 Reza
438 Reza
438 Reza
438 Reza
438 Reza
439 Jonny
440 Reza
441 Rony
442 Bony
443 Rony
Thanks in advance for you assistance .
Warm regards,
Hamid
Hi, I am trying to count non text items listed in one column. These items belong to each patients who can have a cardiovascular risk that could be "<10%", "10 - <20%", "20 - <30%", "30 - 40%". How do I use countif formular for these to create how many patients for each CVR category?
Hi, I am trying to set up a spreadsheet to check whether colleagues are completing specific tasks (that are recorded on a different spreadsheet), at least once within each 28 day period and to count how many of the task they did within the period. The best way I can think of it to to pull the count for each date and then have a separate tab that then works off that count to be certain the colleague is competent over the year. But I'm struggling to get the correct formula. What I need is: the count if column M on spreadsheet A is equal to cell A2 on spreadsheet B AND the date within column Q on spreadsheet A is equal to B1 on spreadsheet B - spreadsheet A being the one that contains the original data and spreadsheet B being the new one I am setting up
How to combine following two formula..?
if(and(f2>=d25,i2<=e25),b25,"")
if(countifs(ar3:ar6,i24),"",b25)
I have a file with some numerical grading,i need the lowest grading ...
how can i calculate the same
Row Labels- 2 3 4 5 1 6
Hi,
May be this is a silly question, but i cant figure it out the solution. Here's the data:
A1 Korea
A2 Indonesia
A3 Indonesia
A4 Singapore
A5 Malaysia
A6 Indonesia
A7 Malaysia
A8 Indonesia
I want to calculate what is the most showed up country. Do you have any solutions? Thank you in advance
Hey I want to concatenate names in excel ..but the conditon is
In coloum A
A1 is having an I'd and then second I'd number is present in another cell suppose A6 .. so I want excel to concatenate name from A1 to A5 ..and excel can do the same ..for entire sheet .with varying range of cells with I'd number
I would like to find out how to group values using COUNTIFs in excel. For example, i have a grade sheet of students with the student name, subject and grade.
Student Subject Grade
Ann English A
Ann Math A
Joe English B
Ann Science B
Joe English A
I want to group by the Student and the grade
Student Grade Total
Ann A 2
Ann B 1
JOE B 1
Joe A 1
A1 09:00:10 , A2 Medical , A3 11:03:25 , A4 blank
what can I show B1 is 1 , B2 is 0 , B3 1 , B4 0 .
Hi,
Please describe the logic behind your calculations. What do you want to count? Why B1 = 1? Please specify what you were trying to find, what formula you used and what problem or error occurred.
this has been helpful
Is it possible to take this a step further and incorporate date range to this?
Each sheet contains a column with a date that something was completed...column R
The criteria in each sheet needed to be counted is column T
In a new "summary" sheet is where calculations would occur using "SUMPRODUCT(COUNTIF(INDIRECT"
In this "summary" sheet, column "A" contains the dates representing a week where the specific criteria occurred.
Columns Row 1 in column B, C and D have the criteria needing to be counted based during the week listed in column A.
Unfortunately limited in formatting in the forum
Column A
Row 1 Week Of
Row 2 11/15/2020
Row 3 11/22/2020
Row 4 11/29/2020
Column B
Row 1 "Missed"
Row 2 5
Row 3 12
Row 4 11
Column C
Row 1 "Caught"
Row 2 7
Row 3 11
Row 4 13
Column D
Row 1 "Disconnect"
Row 2 11
Row 3 1
Row 4 5
I hope this makes sense. I have been unsuccessful in getting anything to work.
Thanks in advance.
Hello!
Sorry, I do not fully understand the task.
Describe in detail the conditions for counting.
Assuming I have a table with two columns J and K with entries of rows either, row1 ,(J=No,K= Yes), row2(J=yes,K=No), row 3 (J=Yes,K=Yes) ROW 4, (J=No,K=No), row5 ,(J=No,K= Yes), row6 (J=yes,K=No), row 7 (J=Yes,K=Yes) ROW 8, (J=No,K=No),...onwards for different documents.
Whenever a No appears on either column J or K or both columns it should be termed error. What formula can I use to help me analyze a large data with the above scenarios. Analysis can be done on another sheet.
Hello!
If I got you right, the formula below will help you with your task:
=IF((COUNTIF(J:J,"No") + COUNTIF(K:K,"No"))>0,"Error","Ok")
I hope my advice will help you solve your task.
I'm trying to do countif to get results from different cells not ranges.
A1 table
A2 chair
A3 table
A4 leg
I basically need countif (A1,A3, "table") but that doesn't work.
I've tried this indirect formula but it still doesn't work =SUM(COUNTIF(INDIRECT({"a1:a1","a3:a3"}),"table"))
Any ideas?
Hello!
The COUNTIF function can only work with one range. Therefore your formula is not possible. Try
=SUM(--(A1="table"),--(A3="table"))
I hope it’ll be helpful.
I want know how is count last 2 days continuous absent
Hello!
I’m sorry but your task is not entirely clear to me. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result.
It’ll help me understand it better and find a solution for you.
I want to know about . the person who absent last 2 days continuously. if he continuously 2 days did not come to the job his salary should deduct. i want know how is count in excel his continuously absent day ….please help me....
The response that you sent to me earlier in the day was =IF(COUNTIFS(A:A,A2,B:B,"received")>0,1,""). I do know just how to specify the ranges in this formula. When I attempted it various ways =IF(COUNTIFS(F2:F309,F2,J2:J309,"received")>0,1,"") no error resulted ,but then no count appeared. The count should be 1.
I am trying to develop an Excel formula to obtain a count.
If an ID number appears multiple times in one column and the result “received” appears in a different column, what is the formula to count only 1 instance of the occurrence of the ID and “received”?
For example:
Column Column
F J
5596326 attempted
5596326 delivered
5596326 received
5596326 received
5596326 sent
5596326 Wrong Number
The ID number appears 6 times in column F, and “received” appears twice in column J. With a correct formula, the result should be 1.
What is the formula? And please specify the row ranges in the formula.
Both columns may contain 1,000 or more rows.
Thank you for any assistance.
I have three sheets
Sheet 1
Sheet 2
Sheet 3
I need to count values from Sheet 2 while matching criteria's from Sheet 1 & 2 both.
I want to get these results on sheet 3.
Since this record is for entire month for around 900 names.
Please help & suggest why am I not able to get the results if using countifs formula.
Hello!
The COUNTIFS function works with data from different sheets. Unfortunately, without seeing your data it is difficult to give you any advice. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find, what formula you used and what problem or error occurred. It’ll help me understand it better and find a solution for you.
SUMPRODUCT(COUNTIFS(Roster!J5:J444,Sheet1!A1,Roster!K5:K444,Sheet1!B1,Attendance!S5:S444,"P"))
Why am I not able to get the count on sheet 1 with this formula.
Please help me out with this
Hi, I have this data
S/N YEAR MONTH DAY DATE FULL NAME
1 2020 SEPTEMBER TUESDAY 09/01/2020 STEPHEN TAYO
2 2020 SEPTEMBER TUESDAY 09/01/2020 FADE OGUNRO
3 2020 SEPTEMBER TUESDAY 09/01/2020 FADE OGUNRO
4 2020 SEPTEMBER TUESDAY 09/01/2020 FADE OGUNRO
5 2020 SEPTEMBER TUESDAY 09/01/2020 MRS WUNMI OGUNBIYI
6 2020 SEPTEMBER TUESDAY 09/01/2020 MRS WUNMI OGUNBIYI
7 2020 SEPTEMBER TUESDAY 09/01/2020 MRS WUNMI OGUNBIYI
8 2020 SEPTEMBER TUESDAY 09/01/2020 LANRE KUYE
9 2020 SEPTEMBER TUESDAY 09/01/2020 LANRE KUYE
10 2020 SEPTEMBER TUESDAY 09/01/2020 KOME AJEGBO
11 2020 SEPTEMBER TUESDAY 09/01/2020 TIWA SAVAGE
12 2020 SEPTEMBER TUESDAY 09/01/2020 MS ASMAH WILLIAMS
13 2020 SEPTEMBER TUESDAY 09/01/2020 AISHA
14 2020 SEPTEMBER WEDNESDAY 09/02/2020 LANU AGUSTO
15 2020 SEPTEMBER WEDNESDAY 09/02/2020 MS FATIMA
16 2020 SEPTEMBER WEDNESDAY 09/02/2020 TIWA SAVAGE
17 2020 SEPTEMBER WEDNESDAY 09/02/2020 TIWA SAVAGE
18 2020 SEPTEMBER WEDNESDAY 09/02/2020 MR JIDE
19 2020 SEPTEMBER WEDNESDAY 09/02/2020 MR JIDE
20 2020 SEPTEMBER WEDNESDAY 09/02/2020 MR KEVIN JOHNSON-AZUARA
21 2020 SEPTEMBER WEDNESDAY 09/02/2020 MR KEVIN JOHNSON-AZUARA
22 2020 SEPTEMBER THURSDAY 09/03/2020 MRS HADIZA
23 2020 SEPTEMBER THURSDAY 09/03/2020 TOYIN SUBAIR
24 2020 SEPTEMBER THURSDAY 09/03/2020 MR YINKA
25 2020 SEPTEMBER THURSDAY 09/03/2020 MR YINKA
26 2020 SEPTEMBER THURSDAY 09/03/2020 FADE OGUNRO
27 2020 SEPTEMBER THURSDAY 09/03/2020 FADE OGUNRO
28 2020 SEPTEMBER FRIDAY 09/04/2020 MR SAM
29 2020 SEPTEMBER FRIDAY 09/04/2020 EMMANUEL
30 2020 SEPTEMBER FRIDAY 09/04/2020 MR IFEOLUWA BAKARE
31 2020 SEPTEMBER FRIDAY 09/04/2020 MR IFEOLUWA BAKARE
32 2020 SEPTEMBER FRIDAY 09/04/2020 MRS EBI WILLIAMS
33 2020 SEPTEMBER FRIDAY 09/04/2020 ETHEL OKOSUN
34 2020 SEPTEMBER SATURDAY 09/05/2020 SEGUN AWOLOWO
and i want to identify the number of transaction each customer does in a month, a customer can only do one transaction in a day, and multiple transactions in subsequent days whenever they come into the store. Please how do I go about this?
Hello!
Pay attention to the following paragraph of the article above COUNTIFS formula with multiple criteria.
=COUNTIFS(B:B,B1,C:C,C1,F:F,F1)
I hope it’ll be helpful.
I have to calculate attendance for 5 periods in different sheets. Using countif how can i calculate attendance
Hello!
You need to use the COUNTIFS function for each sheet and then sum the 5 results. In doing so, you can use external references to sheets. COUNTIFS does not work with 3D links.
Excellent Example
I am trying to count the new number of impacted individuals for today (prefer, workdays), I also have a number of other criteria. This is the current formula I use to use to count the total number =COUNTIFS(AN2,"=*?*",P2,"=No",D2,"=Reserve"). I would like a way to count only the new ones added today. I have a entry date column in J2.
Thanks in advance
Hello!
Unfortunately, without seeing your data it hard to give you advice.
If I understand your task correctly, the following formula should work for you:
=COUNTIFS(AN:AN,”=*?*”,P:P,”=No”,D:D,”=Reserve”,J:J,TODAY())
In a range, is there any formula where i can pick
how many 1s, how many 2s, how many 3s etc... in one step
Hello!
The number of values that match a condition can be calculated using the COUNTIF function (read here).
Hello,
I am in need of assistance locating the right formula for my workbook.
in sheet1-I have a list of names, with a current fourmula " =COUNTIF('Element Core'!A2:A500,'Agent Assignment'!D41)" to capture how much data from each tab they are assigned too.
In sheet2-Shows the actual amount of cells each agent has been assigned to in column A, i would like to somehow divide the completed task in column B of sheet 2 to the total number they have been assigned to in sheet 1.
example
agent Name - # of cells Assigned too(from sheet 2)
Tom Jerry - 40
I would like to divide 40 by what the agent has already completed in sheet2 on column B.
Thank you.
Hello!
If I understand correctly, then you just need to divide the values from column A by the values from column B. I suppose that the number of completed tasks can be calculated with approximately the same formula as the number of assigned tasks. But there is no information in your question about this.
Please describe your problem in more detail. It’ll help me understand it better and find a solution for you.
Hi Alexander
Thanks - that works perfectly!
Adam
Hello
I have a table of data, on column of which is either ***, ** or * depending on the prioritisation of that row. If I now want to do a countifs function, how would I insert a condition that a row has *** for that specific criteria? I tried using a tilde, " " but cant get it right
Thanks!
Adam
Hello Adam!
To count the number of "***" values, add a tilde before each *
=COUNTIFS(K1:K40,"~*~*~*")
I hope it’ll be helpful.
Hi,
Can you provide your help regarding a specific formula:
I want to do a calculation in which I want to exclude character which lies in a sequence.
For example. I have 10 numbers: 1, 3, 5, 10, 2000, 2001, 2002, 3052, 3053, 3054.
Now, I want to count 1 and ignore 3, 5, 10 mean to ignore the up to 10 number in consective orders. Similiartly I want to count just 2001 and 3052 and want to ignore other number from counting. I have to do this calculation in up to 100K.
If you provide your help I will be very thankful.
Best
Abdullah
Hi
I have a data set where in row 2 I have headings of "Squad", "Mins", "Goals", "Assists" and these repeat several times across the row. I'm trying to find a formula which counts the number cells under any of the "Mins" columns which are greater than 0, but only when the number in the "Squad" column is greater than 11.
I can do a simple count of the first part (=COUNTIFS($N$2:$KG$2,"Mins",N41:KG41,">0") however I am unsure how to add the second part to only count this IF $N$2:$KG$2,"Squad",N41:KG41,">11".
Have you got any thoughts about how I can add this IF element? I have tried a few combinations but the best i get is a #VALUE! error. Any help much appreciated.
Hi,
I have two columns with huge number of data in it. Coulmn A has the list of applications and Column has the list of servers. Each application hits different servers . Want to know on the count of application per server using a formula.
My queson is to display the last entered number position and that will automatically change the value in another cell.
If suppose, in a column Sr.No. 1,2,3,4,5,6,7 now the last no. is 7 if I enter 8,9,10,...the another which is having the reference will catch the latest entry inthis case 10 and update his cell value.
Hi,
I want to count how many times the value = "yes" in column F on data sheet.
this is fine, however, I want this to be date dependent criteria.
Count how many times "yes" appears within a date range specified on reporting sheet, G8 (start date) & J8 (end date).
The corresponding date for "Yes" column is in "g3" on the data sheet.
I currently have:
COUNTIFS(Data!F3:F68, "Yes") + COUNTIFS(Data!G3:G61,">="&Reporting!G8,Data!G3:G61,"<="&Reporting!J8)
But this is counting how many times "yes" appears AND how many times the date appears which is duplicating my data.
Thank you, Hope that makes sense!
Hi,I'm trying to use countifs statement to add 3 certain elements of a table if all are present.
My formula is =COUNTIFS(O24:O31,U24,P24:P31,AA36,J24:J30,AA36)
O23:O31 holds Yes/No
P24:P31 holds a number value
J24:J30 holds a number value
I'm happy with the ranges and the criteria are set values.
The formula works if you have any two elements i.e O24:O31 and J24:J30 or J24:J30 and P24:P30 however once i add the third element it does work.
any help would be appreciated
Hi, how to add any number to existing countif function. By automatically like countif(c1:g1,c82+2)
Ive got the syntax working for a single column
=COUNTIFS($C:$C,"*Mon*" & "*Jan*",$D:$D,1)
which gives me Mon, Jan, Employee 1
now I want to do
=COUNTIFS($C:$C,"*Mon*" & "*Jan*",
Mon, Jan, employee 2
$D:$E,1)
so Im now looking in two columns D:E for employee 2, but the syntax wont work. Any help please
Hello Susan!
You can use the COUNTIFS function. But уach additional range must have the same number of rows and columns as the criteria_range1 argument. The ranges do not have to be adjacent to each other. Please read the above article carefully.
Hi Could you please help me on how to count specific letter from all ODD column or even column?
Hello!
I’m sorry but your task is not entirely clear to me. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result.
It’ll help me understand it better and find a solution for you. Thank you.
please i have data set like
84
9
65
85
41
33
20
20
86
25
40
45
36
82
2
18
36
66
19
51
63
71
35
31
42
all i want to do is to get count for the first numbers only thanks!
Hello!
If I understand your task correctly, the following formula should work for you:
=SUM(--LEFT(A1:A20,1))
I hope this will help
Hi
I'm trying to set up spreadsheet for my darts team that records players' stats.I record their averages, high score and number of scores between set criteria, (ie, total number of scores below 19, 20-39, 40-59, etc.)
I need a formula to reference the player with their scores, within three or more games, so I don't have to do each separately
I hope this makes sense?
Best regards
John
Hello John!
I’m sorry but your task is not entirely clear to me.
Please describe your problem in more detail. Include an example of the source data and the result you want to get. It’ll help me understand your request better and find a solution for you. Thank you.
Hi, I have a spreadsheet which has multiple dates in it, as well as multiple locations. It is for commencement of employees and tracking of probations.
There is a column for locations, as well as a column for programmed start date, actual start date, programmed completion date and actual completion date. I am tracking to identify one month late and three months late for both start and finish for all four locations. The current formula I am trying is: =COUNTIFS(Table4[OPU],"Cq",Table4[Probation Start Due Date],(DAYS(Table4[Probation Start Due Date],Table4[Probation Commenced]>30))), however it is not identifying any data. I would really appreciate some help.. cheers, Jo
Hello!
I’m sorry but your task is not entirely clear to me. Could you please describe it in more detail? What data do you calculate in your COUNTIFS formula? Give examples. Thank you!
Hi,
I need to use the countifs function where the reference range are values extracted through a formula. I do not want to change the reference value from formula to values. Could you help!
Thanks in advance!
Hello!
I’m sorry but your task is not entirely clear to me. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result.
It’ll help me understand it better and find a solution for you. Thank you.
Hi. I have a query.
I want to count how many times a certain thing was came among 2 columns, with two conditions.
Eg.
A= aa as ad af
B= 12 21 22 13
C= Dates day wise
I wanna count how many times AS was with 12 condition at a certain date from C.....
Anyone can help?
Hello!
I hope you have studied the recommendations in the above tutorial. Please specify detailed and accurate what you were trying to find, what formula you used and what problem or error occurred. It’ll help me understand the problem you faced better and help you.
Hi,
I'm doing a race night and want to write the names of all the people who have placed a bet in one cell. In another column I then want to count number of the names in the first cell.
Eg. (Tom,Dick,Harry) count = 3
Is there a formula that could do this please?
Hello
If the names in the cell are separated by commas, then the count of names can be calculated using the formula -
=LEN(A1)-LEN(SUBSTITUTE(A1,",",""))+1
I hope it’ll be helpful.
Hi,
I have some problem getting the formula for my excel file. it took me to much time to solve it even now i cant figure it out. i dont have really much knowledge on excel though. would you mind helping me to create a formula to condense all equal date with another criteria.Example columnA(Dates) columnB(text).To make it more clearer. All May 5,2020 in column A and technical in column B will be count as one.
Hello James!
I think this article will help you.
I hope my advice will help you solve your task.
I am trying count the number of assets in a given location within a given range of operating hours. I have successfully used "=countifs($F:$F,"EVT",$G:$G,",9999.9"). My problem is determining the formula for counting the number of assets with operating hours between 10000 and 19999.9 hours. Thanks.
Hello!
I’m sorry but your task is not entirely clear to me.
Your formula cannot work. There may have been an error copying it. Please let me know in more detail what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result. It’ll help me understand it better and find a solution for you. Thank you.
I need a formula for counting the number of columns in a row with values greater than 5.
Ex. Out of Column B , D , G - B1 & G1 has the value greater than 5, so I need to get count as 2.. How is it possible.
Hello!
If I understand your task correctly, the following formula should work for you:
=SUM(IF(COUNTIF(B:B," > 5")>0,1,0),IF(COUNTIF(D:D," > 5")>0,1,0),IF(COUNTIF(G:G," > 5")>0,1,0))
I hope this will help, otherwise please do not hesitate to contact me anytime.
Hello , I'm trying to count a name that is in another column with certain date range and count only the names that have a text in another column , could you please help with what formula to use.
Hello Juan Romo!
I’m sorry but your task is not entirely clear to me.
For me to be able to help you better, please describe your task in more detail. Please let me know in more detail what you were trying to find. It’ll help me understand it better and find a solution for you. Thank you.
Hi!!
Thank you so much for your help. I am trying to do a COUNTIFS with multiple criteria. I tried using SUM(COUNTIFS and it did work in the beg but now I need to add more criteria. What I am pretty much trying to do is to put the following formula into ONE - the first part searches for MPS[Warehouse] "AAA" and the second for "BBB".
=SUM(COUNTIFS(MPS[Work Ticket Status], {"NEW","MRD","PRD","PIC","PUR"}, MPS[Warehouse], {"AAA"}, MPS[NEW Production Start Date], ">=5/1/2020", MPS[NEW Production Start Date], "<"&TODAY(),MPS[NEW Production Start Date], "=5/1/2020", MPS[NEW Production Start Date], "<"&TODAY(),MPS[NEW Production Start Date], "<=5/30/2020"))
- BECAUSE the next thing I need to do is to use this formula to count the ones that are NOT "AAA" or "BBB" and that is the real problem begin! (In fact I have more than just 2 warehouses, this was just an example).
Hello Francesca!
You can use something like this formula.
=SUM(COUNTIFS(A19:A25,{"NEW","MPD","PRD","PIC","PUR"}, B19:B25,{"AAA","BBB"}, C19:C25,">=5/1/2020", C19:C25,"<"&TODAY(), C19:C25,"<=5/30/2020"))
There is an error in your formula.
Conditions
MPS [NEW Production Start Date], “> = 5/1/2020”
and
MPS [NEW Production Start Date], "= 5/1/2020”
contradict each other.
It will be executed only
MPS [NEW Production Start Date], "= 5/1/2020”.
Condition
MPS [NEW Production Start Date], “<" & TODAY ()
repeated twice.
I hope this will help, otherwise please do not hesitate to contact me anytime.
1) the only thing I see differently would be the range? Because my problem is that I do not have a specific range, the query is large and I need to use the entire column as new items might be added. and it was a typo, it was supposed to be >5/31 thanks for the letting me know. 2)What I am having trouble is with the multiple item types {"NEW", "PUR", "PIC" etc}. The formula is not reading all of them, I guess a need a OR? 3)And In case I DO NOT want those warehouses, the "" is not working for me.
THANK YOU!!!
Hello Francesca!
If you want to use the entire column, just change the link to A: A. But the speed of calculations will decrease significantly.
The COUNTIFS function cannot use AND or OR operators as arguments.
If the formula does not consider any element in your table, check how it is written. There may be spaces or some other characters.
Indicate for comparison only the values that are necessary.
Hi,
I am trying to count, for example the number of occurrences of a particular text , say "SP", in a row from column c to column dd - OK so far. But now I want to only count the occurrences in the row where the date in column A = today(). The table has multiple (consecutive) dates in column A. Is it possible to do this with a formula? Maybe countif with offset and match somehow? Thanks for looking.
Hello Steve!
Use the paragraph in this guide above "Count cells with multiple criteria (AND logic)". One of the conditions is A1 = TODAY ()
Alexander, Thanks for your help.
I am trying to put a formula in a single cell which will, each day, count up occurrences of eg. "Y" and show the total - not once per row, but just a single cell, showing just the current days completeness (="Y"). I have tried =COUNTIFS($A$1:$A$21, "="& "Today()",$C$1:$N$21, "="& "Y") but this gives #Value! as result. Any further ideas? Cheers. Sample data follows:
04-May EL EL EL EL EL EL
05-May SJ Y SJ Y SJ Y SJ Y SJ Y SJ Y
06-May EL y EL y EL y EL y EL y EL y
07-May LR y LR y LR y LR y LR y LR y
08-May SJ Y SJ Y SJ Y SJ Y SJ Y SJ Y
09-May LR Y LR Y LR Y LR Y LR Y LR Y
10-May EL Y EL Y EL Y EL Y EL Y EL Y
11-May SJ SJ SJ SJ SJ SJ
12-May LR LR LR LR LR LR
13-May EL EL EL EL EL EL
14-May SJ SJ SJ SJ SJ SJ
15-May LR LR LR LR LR LR
16-May EL EL EL EL EL EL
17-May SJ SJ SJ SJ SJ SJ
18-May LR LR LR LR LR LR
19-May EL EL EL EL EL EL
20-May SJ SJ SJ SJ SJ SJ
21-May LR LR LR LR LR LR
Hello Steve!
The data ranges that you use in the COUNTIFS function must be the same in size. That is, if the first is 1 column, then the second is also 1 column. And you have a second range - 12 columns.
Please try the following formula:
=SUMPRODUCT(--(($A$1:$A$21)=TODAY()), (C1:C21="Y")+(D1:D21="Y")+(E1:E21="Y"))
Add it yourself to column N.
I hope it’ll be helpful.
Cracked it. Thanks for your inspiration Alexander. Here is what I used …
=COUNTIF(INDIRECT("C" & 3+MATCH(TODAY(),A4:A31)):INDIRECT("DD" & 3+MATCH(TODAY(),A4:A31)),"Y")
Hi there,
I am trying to combine these formulas so that both criteria must be true for it to be counted however as my ranges are different sizes this is problematic, is there a way to combine these?
=COUNTIF('Volunteer Call Handler Form APRIL'!Q:V,"XXXXXXX - recent") COUNTIF('Volunteer Call Handler Form APRIL'!G:G,"Inbound"))
Thanks, Tilly
Hello Tilly!
If both conditions must be fulfilled, unfortunately, the sizes of the ranges for each of them must be the same.
Hi,
Please can you help!
I am creating a reporting sheet in excel for different information from throughout the workbook.
I would like to create a formula that can tell me how many times the word "Late" appeared within in a month. The data will be pulled from another sheet to the reporting sheet.
My date column is B date 24/04/2020 and Late column is F.
Thank you for any advice.
Hi Rachel,
You may use the array function below to count the number of values on several sheets:
=SUM(IFERROR(COUNTIFS(INDIRECT("'"&$E$2:$E$32&"'!F:F"),A3, INDIRECT("'"&$E$2:$E$32&"'!B:B")," >="&DATE(YEAR(A4),MONTH(A4),1), INDIRECT("'"&$E$2:$E$32&"'!B:B")," <="&EOMONTH(A4,0)),0))
Where A3 is the criterion to search values by (in your case, it is Late);
F:F is the searching range on each sheet;
A4 states for the date you conduct the search by. Note! The dates you apply the formula to should be of the same month as the one in A4;
B:B is the dates range on each sheet;
$E$2:$E$32 - the list of the sheets to make the search in.
Since the formula above is the array function, please don't forget to use the Cthr+Shift+Enter combination to apply it.
Hope it'll help you with your task.
I have Count like COUNTIF((C4,F4,I4,L4),">0"), result are not find.
please help.
Hello Ashok,
Please try the following formula:
=COUNTIF(C4,">0")+COUNTIF(F4,">0")+COUNTIF(I4,">0")+COUNTIF(L4,">0")
Range can only be contiguous cells.
I have a spreadsheet that has three columns I am working with...Column C that has Dates Sampled, Column H that has Quantity, and Column K that has Aggregate type. I need to have a formula that will give the Quantity of X aggregates for each quarter by using the dates sampled to determine the quarters. Is this something I will be able to do with the CountIf function? TIA
Hello Katelyn!
If I understand your task correctly, please try the following formula:
=COUNTIFS(C2:C32,">="&DATE(2020,1,1),C2:C32,"<"&DATE(2020,4,1),K2:K32,"AAA")
I hope this will help, otherwise please do not hesitate to contact me anytime.