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 51. Total comments: 2055
Part code Qty
1 12 Part number '1' total-
2 85 Part number '2' total-
1 47 Part number '3' total-
4 69 Part number '4' total-
3 32
1 12
4 45
2 12
3 36
1 58
4 51
2 78
Please help in summing the total of each part number...
i have a range of data from A2:A308 i want to place a criteria that if the data in the range falls less than 8 it should display primary if greater than equal to 8 and less than 13 it should display secondary and if greater than equal to 13 it should display tertiary
Hi Zeta,
I think this will help...
=IF($A1=13,"Tertiary","Secondry"))
=IF($A1=13,"Tertiary","Secondry"))
i have a problem
that is i have a range of data from A2:A308 i want to place a criteria that if the data in the range falls =8 and =13 it should display tertiary
Greetings from South Africa!
I am creating a database to count four different types of clinical personnel receiving training on medical male circumcision. Information will produce two basic spreadsheets. One counts the number of trainees per training type (8) and segregating each clinical personnel type per month (1,350 cells). The other segregates each clinical personnel type and training received per province (state) (9,350 cells) Thanks to information from your website I created formulas that are working, but my question is how can I copy and paste the formulas that automatically change the month I want to capture. An example is below where 01 represents January. How can I copy and paste the formula setting the month to change automatically to 02, 03, etc?
=COUNTIFS($A$25:$A$5000;"01";$G$25:$G$5000;"D";$I$25:$I$5000;"S";$L$25:$L$5000;"EC"&"")
Thousands of Thank yous if you can help.
Hi,
A B E F
1 Santosh 10 Raj
2 Raj 5 Sajan
3 Sajan 8 Ankit
4 Ranjan 9 Tara
5 Sameer 10
6 Priyanka 4
7 Ankit 8
8 Tara 6
in the above spread sheet there is some names from A1 to A8 consequent the figures on B1 to B8,
My question is Cell E1,2,3,4 i mentioned few names in jumbling way ok, if those names are in the list of A1 to A8 then i want the consequent figure (which mentioned at B1 to B8) to be visible @ F, ok
guide me with the formula...............
Here you go...
if you want name with consequent figure..
=IF(ISERROR(VLOOKUP($C2,$A$2:$A$9,1,0)),"",$C2&VLOOKUP($C2,$A$2:$B$9,2,0))
If you only want the figure then...
=IF(ISERROR(VLOOKUP($C2,$A$2:$A$9,1,0)),"",VLOOKUP($C2,$A$2:$B$9,2,0))
Hi. I have an excel spreadsheet with first names in column A and last names in column B and other information in columns C and on. I access and change this file daily. I need to know when a specific person shows up 6 or more times and then I have to move the data to another sheet. I already have it sorted by last name, column B, but I still have to go through and count each individual name to make sure there are 5 or less or I have to move them. Is there a way to use COUNTIF(S) to let me know if there are names that appear more than 5 times and maybe even what the names are? I have to go through this process every day and it would save me a lot of time looking through the 800 rows.
Hello Svetlana, I really hope there is an answer to this I've tried several ways but it doesn't seem to work. Assuming I have data in A1:A3 and the data totals are in A4 & A5. The data that needs to be added across for example are 2/2, 3/2, 4/1; the left number is the attendance for adults and right side are the children. The data total for A4 would = 9 and A5 = 5. Does it matter if the data in one cell is seperated by either symbol? Ex. 2/2 or 2:2 or 2+2? I need HELP how to add the data across but keeping left side total from right side. Is there a simple solution?
Recipt Credit
Cash Book Bank
564 914308
30,000 30000
30000 4654
43660 30000
1245247 19344
30000 465654
I want to know matching values in col a & b
e.g there are 2 values (30000) in col b
it should show corresponding 2 values in col A & not 3
values as appeared in col a
Recipt Credit
Cash Book Bank
564 914308
30,000 30000
30000 4654
43660 30000
1245247 19344
30000 465654
ok i am trying to make spread sheet that tracks the units average score for said events, but I don't wont to enclude the certain personal that are on a profile preventing them to take a certain event.
So I guess the question is there a way to put an AVERAGE Formula and a COUNTIF Formula in the smae cell, in order track all this type of information or am I too far out in Left Field this function is impossible?
Thanks for your time and answer/assisstance with this issue I have.
If
Names Sales Profit
Kim 100 10
John 250 25
Tim 300 30
Tom 325 33
Sheetal 350 35
Nidhi 375 38
Shyam 400 40
Rahim 425 43
Ali 375 38
Sheetal 325 33
Tom 275 28
Seema 225 23
Tom 175 18
Kim 150 15
Sheetal 200 20
John 250 25
Tim 300 30
How use 'countif'formula for
Q : Excluding Kim there are how many people in the list?
Hi!
How can I use countifs and vlookup together?
Thank you.
Hi Lea,
We have a tutorial on using VLOOKUP with SUMIF and SUMIFS:
https://www.ablebits.com/office-addins-blog/excel-vlookup-sum-sumif/
COUNTIFS and VLOOKUP work in a similar way.
Excellent! Thanks for the clear explanation. This really helped.
H
Hi Alexander,
I guess even my query has been missed out. 176 is my number. So please if you can help me out.
Thank you.
I have two columns, column 1- Dates, column 2- Names.
01/02/2015 ARYA
01/02/2015 ARYA
01/02/2015 ARYA
02/02/2015 ARYA
From the above example, I want the count to reflect 2, in other words I would want it to count as a single occurrence per day i.e., 01/02 - one occurrence & 02/02 one occurrence. Please help me with this. Please help me without date ranges as i need to use it for the entire year for different names.
Hello there, I hope you can help with the following worksheet with multiple tabs.I Maybe COUNTIF could work but i really can't figure it out how.
Code Account Title Jan-05 Feb-05
1000 Advertising $750,75 $-
2000 Office Equipment $- $-
3000 Printers $- $-
1st- I would like to set the date in each column as 16Jan-15Feb, 16Feb-15Mar etc., so that it sums up the invoices amount for each code of only those dates, at the moment it only adds each full month, and i can't seem to find a way to change it without errors. This is how the formula is shown:
=SUMIF('Itemized Expenses'!$J:$J;"="&($A6&TEXT(C$4;"mmm-yy"));'Itemized Expenses'!$E:$E
2nd - I would like to add another formula to this, which also adds the amounts within those dates depending on methods of payment and display it in another column, that is the total paid in cash, total credit card, total direct debit, etc.
Thank you very much in advance for your help.
Lotus
I am ubable to count below data
Name Time
A 12:03:00 PM
B 12:17:00 PM
C 12:00:00 PM
D 12:44:00 PM
E 5:01:00 PM
f 12:21:00 PM
A 12:03:00 PM
B 12:17:00 PM
C 12:00:00 PM
D 12:44:00 PM
E 5:01:00 PM
f 12:21:00 PM
A 12:03:00 PM
B 12:17:00 PM
C 12:00:00 PM
D 12:44:00 PM
E 5:01:00 PM
f 12:21:00 PM
NAME Count
A
B
C
D
E
f
Please help
Thanks again Alexander.
Thanks Alexander, but the formula counts empty cells also in the column. How to count only the cells with values, neglecting empty cells?
=SUM(LEN(A2:A10)-LEN(SUBSTITUTE(A2:A10,",",""))+(--NOT(ISBLANK(A2:A10))))
How do you count two different 'tasks' that are in the same column but only if they are marked 'active' in another column.
I seem to have botched this up & have ended up with this mess:
=COUNT((IF('Combined Project & Milestone'!F:G,"DESTRUCTIVE TESTING")),+OR((COUNTIF('Combined Project & Milestone'!F:G,"INITIAL REPORT")),+(COUNTIF('Combined Project & Milestone'!F:G,"Active"))))
REALLY hope you can help soon.
Thanks
Please disregard the above - I worked it out.
How to count the number of values in a cells separated with a coma.
eg.
1
4,5
6
The number of values should be 4 in the 3 cells. Count function only counts 2 values.
Please use this array formula (press Ctrl+Shift+Enter to complete it):
=SUM(LEN(A2:A10)-LEN(SUBSTITUTE(A2:A10,",",""))+1)
Where A2:A10 is your cells with data. Please note that the formula will return wrong results, if your cells contain some text, e.g. "1,text,text20"
Hi,I Am making a file for my poject.I am facing the some problem in xls pls do help in that. I have to add the farmula that How may rows is on Time and Early only for NAGAR as given the example. total should be come in one cell for both On time+Early of the NAGAR name.
NAGAR On Time
RPRAD Early
BBIAD Late
CCUBG Late
NAGAR On Time
RPRAD Late
BBIAD Late
CCUBG Late
NAGAR Early
RPRAD Early
BBIAD Early
CCUBG Early
NAGAR On Time
RPRAD Early
BBIAD Late
CCUBG Late
NAGAR Early
RPRAD On Time
BBIAD Late
CCUBG Late
NAGAR On Time
RPRAD Late
BBIAD Late
CCUBG Late
Thank you.
Please use
=countifs(A2:A1000, "NAGAR", B2:B1000, "On Time") + countifs(A2:A1000, "NAGAR", B2:B1000, "Early")
Grate. Thank You.....
Thanks Svetlana, you just saved my life and a lot of typing :) awesome post
1 JAMES SHJ MALE MALE FEMALE KIDS
2 RICKY DXB MALE SHJ Formula ? Formula ? Formula ? 7
3CHRISTINA SHJ FEMALE DXB Formula ? Formula ? Formula ? 2
4 LIBA SHJ KIDS AUH Formula ? Formula ? Formula ? 2
5 JOSEPH AUH MALE 11
6 ZARINA SHJ FEMALE
7 WINSTON DXB MALE
8 JENNIFER SHJ FEMALE
9 MINNU SHJ KIDS
10 ARASH AUH MALE
11 MAHIR SHJ MALE
uum yeah, that was very clear how's going to Dubai and sharjah I suppose?
Hello Eddie,
I am sorry, your data look distorted in the comment. For us to be able to assist you better, please post a small sample workbook with your data on our forums and describe in detail what you want to count. We will try to help.
I've been reading around and I apologize if I've missed this(the information has me a bit...confused and I overwhelmed)
I am trying to keep track of some projects between me and a person.
Under one column of cells I have the type of project and in another I have who did it.
I have somewhere a list of how many of each TYPE of project is done and beside that who it was done by so I can keep track of the giant project list.
So say...the C columne says "Project type 1" or "Project type 2" and the D column has "Done by Susy" or "Done by Dave"
I was keeping track of "Project type 1" in one cell. So it's counting how many we did of that type very well.
Then I did the same for Project type 2.
But when I got to the point of: "Project type 1 done by Susy", I tried to put in a formula to count how many times Project1 was done by Susy and another counting how many times it was done by Dave.
...cept it doesnt work. And I'm not quite sure how to do it. I got confused reading the information because it seems to always be consistent info in different columns or different info in the same column and rarely did I find "Only count if both these conditions are met"
Is that..even possible? Neither have value numbers. They use words rather than numbers(obviously they arent actually called 'Project 1' and '2'.
Gah..just writing gets me confused.
Hello, i thank you for helping others unconditionally. I have asked for help and posted twice. Number 177 is the only one i can find. I understand that you have extremely high traffic volumne. But i was just wondering if i am able to get help here or even my request for help is misssed. thank you again for the good works you are doing for all persons and society.
I'm trying to calculate the total number of individuals who meet a certain criteria, but I can't seem to make the "COUNTIFS" formula fit what need. I have a column, EDU and here is some sample data. I want all data to count as 1 except "HS" which should not be counted. The purpose is to calculate the number of individuals who have post-HS education.
Do you have suggestions on how to make the formula work with multiple conditions?
EDU
HS
BA
BS
AA
AS
HS
HS
BA
AA
Hello Shannon,
Please use the following formula:
=COUNTA(A2:A20)-COUNTIF(A2:A20,"HS")
Where A2:A10 is the EDU column
Hi! For my previous question I get answer! But I have other one - if I want to count only "OK" results for IF function for example H7:H19, what function do I need to use?
=IF(C7>0;"OK";"BAD") this one is working, but if I put region
=IF(C7:G7>0;"OK";"BAD")or =IF((C7:G7)>0;"OK";"BAD") excel give me VALUE
Hi,
I'm trying to get excel to find numbers ending in a 7 (i.e. 47, 57, 67) and then need to tell the computer is raise the number to 47 to 50, 57 to 60 and 67 to 70. Please can someone help please?
Thanks
Sue
Hi Svetlana,
I hope you may be able to help?1?
I am designing an attendance spreadsheet for a school using a set of alphabetic codes for attendance, for example - P- Attended, L - Half day, A - Absent.
I also have a summary box for reporting purposes and need to count attendance and absence based on gender (M/F) and grade(k - 10) and ethic background (I,NI) (a column for each).
Therefore I need to count the number of Ps, or A's that exists in the attendance data in the row IF gender=M and grade=K and ethnicity=I
I also want a value returned if the cell is still empty.
I am have tried using : =COUNT(IF((C6:C19="K")*(E6:E19="M"),F6:BM19="P"))
But this returns will a nil value.
Let me know if I need to send through the spreadsheet.
Thanks in anticipation.
Jessie
Warm regards,
Jessie
DATE Service sum(totalHits) sum(Successful) sum(Dispatched) sum(Failed)
11/1/2014 MPESA Uploader 373 285 =COUNTIF:(sheet1:status1,"<=103", sheet1:status1,"<=202")
11/2/2014 MPESA Uploader 227 158 1
11/3/2014 MPESA Uploader 285 284 1
11/4/2014 MPESA Uploader 294 294 0
11/5/2014 MPESA Uploader 301 301 0
11/6/2014 MPESA Uploader 253 251 2
11/7/2014 MPESA Uploader 274 273 1
11/8/2014 MPESA Uploader 283 281 2
11/9/2014 MPESA Uploader 2 2 0
11/10/2014 MPESA Uploader 268 268 0
11/11/2014 MPESA Uploader 7 7 0
11/12/2014 MPESA Uploader 58 57 1
11/13/2014 MPESA Uploader 243 243 0
11/14/2014 MPESA Uploader 195 195 0
11/15/2014 MPESA Uploader 259 259 0
11/16/2014 MPESA Uploader 299 296 3
11/17/2014 MPESA Uploader 291 289 2
11/18/2014 MPESA Uploader 342 342 0
11/19/2014 MPESA Uploader 335 335 0
11/20/2014 MPESA Uploader 394 393 1
11/21/2014 MPESA Uploader 304 302 2
11/22/2014 MPESA Uploader 295 295 0
11/23/2014 MPESA Uploader 308 308 0
11/24/2014 MPESA Uploader 625 617 8
11/25/2014 MPESA Uploader 361 361 0
11/26/2014 MPESA Uploader 295 295 0
11/27/2014 MPESA Uploader 356 356 0
11/28/2014 MPESA Uploader 262 262 0
11/29/2014 MPESA Uploader 227 227 0
11/30/2014 MPESA Uploader 358 358 0
I need to compute the sum failed
Hi,
Can you send me the sample excel, how to calculate & I need the count of net working day
Example: In a monthly if I used to get "n" number if volumes... I want to calculate the ageing.... But I don't want to calculate Saturday & Sunday...
Can you support me to get the the format sample through mail
=NETWORKDAYS.INTL(I6,I36)
I6 - Start Date
I36 - End Date
Auto Show How many date working
Hi any one can help me on the following
Peter 02/01/15
Hari. 05/01/15
Sam. 12/01/15
Peter. 13/01/15
=countifs(a:a,Peter, b:b,"="&today-3) but I suppose to get 1 ryt if today date is 13/01/15??
I have a problem regarding counting multiple criteria and the problem is counting only the "year" my data date like 29/05/2014.
=COUNTIFS('Rabbit Inventory'!$F:$F;"Buck";'Rabbit Inventory'!$E:$E;$AG5;'Rabbit Inventory'!$Q:$Q;"Purchased"; 'Rabbit Inventory'!$R:$R;YEAR(2014))
Hi, Firstly, I thank you for providing this excellent service. You are doing a great service.
I need some help with this. I want to send/link cells or rows or columns to another worksheet/book when the columns meet certain criteria.
For example, if the date and time attended in column D and E is later than a day or 10 hours compared to column B and C, and link those data that match criteria to another sheet.
Thank you and hope to hear from you soon.
Regards.
Joseph
Hi Svetlana,
Please help me get a formula for my query..
In an excel sheet having 3 columns- 'Date', 'Time' & 'Amount'. I need a formula which will add only those amount in the 'Amount' column, where the Date is from A to B & Time between and equal to C & D.
Please can you help me.?
Just to add to above query, A & B are 2 different dates, and C is a time in A & D is a time in B.
Hi,
please help me count the same value from different cells in the same row. The cells I need to be able to choose.
What I need to calculate is the attendance for each student but on two different occasions. So I will have to choose every second cell and thus it can't be a range.
Sun. Dec 21 Mon. Dec 22 Tues. Dec 23 Wed Dec 24 Thurs. Dec 25 Attendance
RW CS RW CS RW CS RW CS RW CS
P P P A A A P P P P 0
P P P P P P P P A A 8
As you can see, it is Communication Skills and Reading and Writing Skills that the student attends on two different times.
I tried
=COUNTIFS(D8,"=P",F8,"=P",H8,"=P",J8,"=P", L8,"=P")
and many other formulas with no success.
Svetlana Cheusheva you are so beautiful
Thanks for Guide.
I am trying to use the COUNTIFS formula
I want to count the numbers of different interest rates in one column and produce a result if it satisfies the criteria that it belongs to a field called MN (there are various other fields..
eg COUNTIFS(('PD11'!$H$8:$H$177,"<6%"),('PD11'!X8:X177,"=MN"))
Help!!
Hi Svetlana,
I have two strings FirstRow & LastRow defined as address ranges
How can I use CountIFS formula to count number of zeroes between these two ranges.
Hello Miss Svetlana Cheusheva,
I want ask you about How do I Sum or ets in one cell. I have 2 cell (A1)(A2), in cell one(A1) have number that I enterd, an other cell (A2) I have condition is that: if A11.000.000*3. It means between 2 Numbers that I imagin
I want function alike this: =if (A11.000.000;A1*3;"No Number")
Is there a way to count the number of instances in a column based on a criteria and then display the results not as a number, but as a list of data from the cells that meet the criteria?
Such as:
Lenovo User 1 Serial#
Lenovo Inventory Serial#
Apple Inventory Serial#
Apple User 2 Serial#
Apple Inventory Serial#
Microsoft User 3 Serial#
=COUNTIFS(A1:A6,"Apple",B1:B6,"Inventory")
But I would like to display the rows where the data meets these criteria, instead of the number of instances.
Desired display in a separate part of the spreadsheet, while not deleting the original cells.
Apple Inventory Serial#
Apple Inventory Serial#
Thank you very much for any assistance, positive or negative.
Timothy Scully
Hi i need to count values in a colum condicioned by another colum, just like a i have XX,YY and ZZ in colum A and Values in Colum B i need to say cout at colum B if at colum A is YY how can i do it? Need help
Hi There I wonder if you can help me with COUNTIFS for text Values:
I have NATIONALITY in row G, and TYPE OF VISA in row J,K,L,M,....(contains "1"/symbol "x" as value).
I use =COUNTIFS(G12:G117,"=NATIONALITY",J12:J117,"1",......) and it works.
now if i want to apply the formula to a new items, how is the fastest way to do that?
I am trying to count the number of Army in one column that is due to depart between a date range of 90 days in a separate column. I have tried =COUNTIF(I:I,="ARMY")+COUNTIF(Y:Y,">="&TODAY()+1)-COUNTIF(Y:Y,">"&TODAY()+90). I get the correct number for the dates in the range, but doesn't exclude Air Force, Marines, and Navy. I hope you can help. Thank you
This time with name...
Hi!
I need to be able to count the number of columns that have a date that is less than 11 days old. I understand I could do this using the Today() function, but it keeps hanging. I currently have =COUNTIFS(Infrastructure!$A$2:$A$2000,"Infrastructure",Infrastructure!$C$2:$C$2000,"<11"(&TODAY()-$C2)
Where infrastructure is the name of the tab to go to, the first criteria says if the cell is 'Infrastructure', then the problem is the last calculation. I want to count the number of occurences where today minus the date in cell c2 is less than 11. CAn you help?
Hi Jennifer,
If my understanding is correct, you need just need to tweak the formula a little bit:
=COUNTIFS(Infrastructure!$A$2:$A$2000,"Infrastructure",Infrastructure!$C$2:$C$2000,">="&(TODAY()-11))
I am trying to count the amount of cells that list "Baltimore" in column H and the Agents name in column F. So basically how many lines in a sheet that contain a name AND a particular client.
I tried =COUNTIF(Eval_Data!F:F,BRL_Agent_Summary!C4)+COUNTIF(Eval_Data!H:H,”Baltimore”)
I fount that this will count the agents name but every instance that agents name appears and also if Baltimore appears.
I also tried =COUNTIFS(Eval_Data!F:F,"C4",Eval_Data!H:H,”Baltimore")
But it isn't counting the cells I want. It is bringing back 0 when I know there is data. I'm not sure what is wrong.
Hi Joanna,
Try the following formula:
=COUNTIFS(Eval_Data!F:F,BRL_Agent_Summary!C4,Eval_Data!H:H,"Baltimore")
1202 13
1401 110
2107 121
1108 140
1111 154
1103 210
2102 812
2103 1103
1208 1104
1014 1105
1107 1111
1105 1154
2308 1204
1206 1210
n/a 1231
1154 1401
2305 2101
1306 2102
2101 2103
1204 2107
1201 2201
1210 2302
2302 2308
1104 (blank)
1106
2104
1301
1303
1402
2201
2309
1205
I have two column's of number.
Column1 is actual numbers
Column2 is numbers that have been input manually
I want to use a countif function to tell me how number in Column2 are not in Column1
Hi Richard,
The task requires creating a helper column, say Column C. enter the following formula in C1 and then drag it down to other cells:
=IF(AND($B1<>"",COUNTIF(A:A,$B1)=0), "Not in Column 1", "")
After that, you can use the below formula to count how many numbers in Column2 are not in Column1:
=COUNTIF(C:C, "Not in Column 1")