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 10. Total comments: 791
I am using this formula to look in a range and find (match) all instances of the text in "N44", and on the next 7 rows, "N44" becomes "N45", "N46" and so forth, for a list of 8 instances. (i.e., looking for the word "won", "lost", "waiting word".
= COUNTIF('2022'!$K$3:$K$300,N44)
My problem is that I am getting a wrong count. If I personally count in my spreadsheet the instances of "N44", I count one less than what the formula is returning.
The weird part is that not all rows are coming up with the wrong values.
Thank you for your help.
Hi!
I don't have your data, but I'm sure the function is correct. I don't quite understand what "wrong values" means. Perhaps this is the problem.
I have a countifs formula to be able to count the total amount of a selection made in 3 seperate drop down menus. I am not however, able to have the count on all 3 columns of the drop down menus at once (which would be what I need to do).
EX: =COUNTIFS('Juin 2022'!M:M,E2,'Juin 2022'!G:G,C3)
M representing the column of 1 of the drop downs, but I would need N and O also.
Thank you!
Hello!
Have you tried the ways described in this blog post? Pay attention to the following paragraph of the article above - Count cells with multiple criteria (OR logic). If it doesn’t work for you, then please describe your task in detail, I’ll try to suggest a solution.
Hi- Hoping you can help me.
I have two columns of dates: Event Date, and Action Date. There are more Action Dates than Event dates.
These dates are on different worksheets.
I want to find out have many actions happened within 30 days of all of the Event dates
ie, if an event happened on 1/15/22, how many action occurred between 1/15/22 and 2/14/22?
thanks!
Hi!
If you read the last paragraph of this article carefully, you will easily find the answer there.
=COUNTIFS(Sheet1!A1:A10," > ="&DATE(2022,1,15),Sheet1!A1:A10," < ="&(DATE(2022,1,15)+30))
I have a Problem with counting the multiple numbers with "50". Is there a formula to compute how many "50" combining with "today()" formula? Because I want to count all "50" for today only not the whole data set. Hope you can help.
Thank you.
Hi!
I’m sorry but your description doesn’t give me a complete understanding of your task. I'm assuming you want to count the number of values given two conditions. The COUNTIFS function can help you with this. If that's not enough, then explain the issue in more detail.
Hi,
Great tips!
I have a question, do you know how to do the COUNTIFS formula to exclude a word?
So for example, I want two different types of formulas, the first one, I wanna include "word", I did this formula:
=COUNTIFS(Links!J:J,APRIL!E58,Links!M:M,"*word*")
The second one, I want to exclude "word". Is this possible?
Thanks!
Hello!
To exclude “word”, you can subtract its amount from the total number of values.
=COUNTA(Links!M:M) - COUNTIFS(Links!J:J,APRIL!E58,Links!M:M,”*word*”)
I do not recommend using a reference to the entire column in the formula, as this can significantly slow down the calculation.
=SUM(COUNTIF(B2:G2,{"TWG","DEA","FBI","Audit"})*{1,2,3,4})
I am using this formula to assign # values to each text option. So TWG=1, DEA=2, etc. These are trips my company does and the amount of hours each trip is. I am attempting to track how many total hours each colleague has done.
So when I plug in any of those text options in mu table tracking each person's trips, it assigns it a # value and adds up those values in the last column to give me the person's total hours. It works easily, but I don't want to have to keep updating the formula when adding new trip/hour combo (text/# value) .
Is there a way I can put a range of cell values for the criteria and the # values in the above formula? This way I can have a separate table and every time I add a row containing a new trip/hour combo (text/#value) it updates the formula.
Hello!
Write your trips in column A. In columns B and C, write down all the possible travel options and the corresponding number of hours for each of them.
Enter the following formula in cell D1 and then copy it down along the column:
=COUNTIF($A$1:$A$200,B1)*C1
I hope it’ll be helpful.
I'm have a table with as follows:
Item No. --- Sales Order
12345 --- ABCD
54321 --- ABCD
12345 --- EFGH
54321 --- IJKL
What I'm trying to accomplish is COUNTIFS Item No. where Sales Orders Match.
In this case it would be 2, lines 1,2. It's a pretty huge dataset so I was trying to utilize a matrix array of item no x item no and populate. Any thoughts on how this can be accomplished?
Hello!
The answer to your question can be found in this article: Count the total number of duplicates in a column.
This should solve your task.
Hello Team,
Have an interesting problem that we require some help with. We have a daily delivery schedule sheet that comprises of multiple texts with quantity in a single cell. Is there a way to do COUNTIF formula to extract these data? Some of these data do consist of strikethrough data that shouldn't be taken into account.
Also, is there a way to send screenshots so that you will be able to understand the question?
Thank you in advance!
Hi!
Excel formulas cannot determine the format of individual characters in a cell (such as strikethrough characters).
To do mathematical operations with numbers, these numbers must be extracted from text into separate cells.
Please have a look at this articles: How to extract number from string in Excel and
Extract number from string using regular expressions (Regex).
I hope I answered your question. If something is still unclear, please feel free to ask.
Hi all,
Could you please help me to find a formula to count the number of unique values only in one column with a criteria in a another column. Example: There is a column with ID numbers for birds but there are some duplicates (these records must stay in the sheet) and there is a column with a year for when the bird census was done. We need to calculate how many birds with unique id (excluding duplicates) were recorded in Year1, then in Year2 and so on.
Grateful for your assistance.
Hello!
You can find the examples and detailed instructions here: Count unique values with criteria.
=IFERROR(ROWS(UNIQUE(FILTER(A2:A10,B2:B10=E1))), 0)
E1 -- year
I hope this will help.
I have a data set where respondents are allowed to select multiple options (A, B, C, D, E .. etc)
My formula "=countifs($F$2:$F$120, "A", $C$2:$C$120, "Yes")" only shows respondents who only choose "A", but what I want to count are respondents who chose "A" and other options as well.
Would greatly appreciate your help!
Hi!
If all selected options are written in one cell, then you can use the SUMPRODUCT function:
=SUMPRODUCT(--(C1:C120="Yes"), --(ISNUMBER(SEARCH("A",F1:F120))))
If this is not what you wanted, please describe the problem in more detail.
I have a workbook with two tables (A,B). The table I am working in, (A), has descriptions in Column A (Discrepancies found) like:
"1.06. The instrument has been preset"
Table B has headings of Team and several Section x columns. Under each heading is a team name and multiple selections for each Section x for each row. So the Section comment may have more than one entry in each row. I also need to strip the first 6 characters of what is in Column A table A. I use:
=COUNTIFS(Tbl_B[[Team]:[Section 6 Comment]],"*"&MID([@[Discrepancies found]],6,80)&"*") which finds and counts the comment in any of the Section columns for each row of Table fine.
But, I need to count the number of times "The instrument has been preset" occur in each row for those Section columns and Team = "Outgoing". When I try:
=COUNTIFS(Tbl_B[[Team]:[Section 6 Comment]],{"*"&MID([@[Discrepancies found]],6,80)&"*","Outgoing"})
I get an formula error which highlights the second quotation mark from the first asterisk {"*"&MID([@[Discrepancies found]],6,80)&"*" ...}
I have also tried to look across the Sections and Team, but it returns a #Value error:
=COUNTIFS(Tbl_B[[Section 1: Checking Instrument / Customer Settings]:[Section 6 Comment]],"*"&MID([@[Discrepancies found]],6,80)&"*",Tbl_B[Team],"Outgoing")
Hi!
It is very difficult to understand a formula that contains unique references to your workbook worksheets. I can't check the formula that contains unique references to your workbook worksheets, sorry.
Give a simpler explanation of your problem. Give an example of the source data and the desired result.
Figured this out. Thanks.
Figured this out. You can not combine multiple columns with a single column in the Countifs statement. Narrowed to each column and now I can look up multiple items per column. But I loose searching the whole sheet, so I split Table A for each section.
Hi, fisrt I have to say that this posts are SO helpful!
I have a question in the example "Formula 2. SUM COUNTIFS with an array constant" how could I have the count of two different values (apples and oranges) e.g. =SUM(COUNTIFS($A$2:$A$11,"apples","oranges",$C$2:$C$11,{"cancelled","pending","in transit"}))
Thank you!
Hello! I have read through this article a few times and can't figure this out. In my purchases report, say we have the month (ignore the year part) in one column and the item we purchased in another column. Each row is say, a purchase. So I want to know how many keyboards purchased in the month of June. I need a formula that will bring in that information. It will count how many keyboards from one column match up with June in the month column to bring me a count. Can you please assist? I have been working on this one for a while! I have a feeling I have to have multiple commands in the same formula but have come up short.
Thanks!
Hi!
Have you tried the ways described in this blog post? Use the COUNTIFS function with two criteria: month number and product name.
Thanks this has helped keep up the great work.
I was wondering if there was a way to do what I'm trying with one formula instead of multiple?
I am formatting one cell "A1" to indicate if I have any one of the specific items listed more than once in a range.
I have used the below and it does work just wanted to know if there is an easier way with one formula?
The range will have items that are similar like apple or apples2 I'm not interested in those just the ones below and need to know there is more than 1.
formatting rule1
=COUNTIF(range,"apples1")>1
formatting rule2
=COUNTIF(range,"apples3")>1
formatting rule3
=COUNTIF(range,"apples4")>1
List example 1
apples1
apples3
apple
apple
apples4
so nothing of interest is = >1
Do not highlight A1
List example 2
apples1
apples3
apples2
apples2
apples2
apples1
apples4
so
something of interest apples1+apples1= >1
Highlight A1
Hello!
If I understand the problem correctly, you can use an IF function with multiple conditions.
=IF(OR(COUNTIF(range,”apples1″)>1,COUNTIF(range,”apples3″)>1, COUNTIF(range,”apples4”)>1),TRUE,FALSE)
or
=(COUNTIF(range,”apples1″)>1)+(COUNTIF(range,”apples3″)>1)+ (COUNTIF(range,”apples4”)>1)
I hope my advice will help you solve your task.
Hello Team
I have a query regarding CountIfs function for multiple criteria Selection
Here University Name & Session came from a another tab,
When I select the university name as Surrey and Select Session as FA22 so the result will be "2"
Using this Formulla: =sum(COUNTIFS(SFK!$O$8:$O$500,$M$5,SFK!$J$8:$J$500,{$N$4}))
(Sheet Name=SFK , University Name Range=O8:O500 , University Name Selection=M5, Session Range= J8:J500 , Session Selection= N4)
Example
University Name FA22
Surrey 2
Or
When I select the university name as Surrey and Select Session as SP23 so the result will be "1"
University Name SP23
Surrey 1
These two examples are OK for me but the query is " When I select University Name and want all session as a result will be "3" How can I formulate this? I want to Select All Session to get total result also.
Thanks in Advance
Hello!
If I understood you correctly, then the second criterion can be excluded from the formula.
=COUNTIFS(SFK!$O$8:$O$500,$M$5)
We use a monthly schedule to record tasks performed by person. The schedule is a basic grid that has the day of each month in row 1, the task abbreviation in column A and the applicable persons ID is listed in cells B2:AF39.
The second spreadsheet has the full description of each task listed in column A and the person's ID listed in row 1.
I need to count the number of times the ID is listed per task aligning with the ID in cell B1 continuing for all rows/columns.
The formula is in a tab labeled "TasksbyPerson"
=COUNTIFS('MonthlySchedule'!$A:$A,"SMMC 3",'MonthlySchedule'!B:K39,B1)
Hello!
Range B:K39 is not possible. In the COUNTIF and COUNTIFS functions, all ranges must be the same size. These functions cannot solve your problem. Use something like this formula with the SUMPRODUCT function.
=SUMPRODUCT(--((B2:K39="persons ID")*(A2:A39="SMMC 3")))
I hope my advice will help you solve your task.
Thank you for the tutorial. I have made my school mark sheet through this.
Greetings: my organization uses a scheduling calendar that can export information to Excel such that calendar dates are populated along the x-axis and individual names are on the Y-axis. Each cell will be assigned a text value that represents the shift assignment for the day for the individual designated on the Y-axis.
I’m trying to create a count of days for an entire year, for each individual, which correlates the assignment designated “A” with any number of assignments, call them “B,C,D,E” that occurs the calendar day immediately BEFORE assignment “A”. Only one assignment for the preceding day “B, C, D OR E) would need to be found to increase the count. How could I write an appropriate formula which would count the cells where assignment (B,C,D OR E) is followed by assignment “A” ? Would it be easier if the data was transposed such that the individual populate the X axis and dates the Y axis?
Thank you for your assistance.
Hello!
If the data for a person is recorded in the range B2:N2, then the count of the cells according to your conditions can be calculated using the formula
=SUM(((TRANSPOSE(B2:N2)="B")+ (TRANSPOSE(B2:N2)="С")+ (TRANSPOSE(B2:N2)="D")+ (TRANSPOSE(B2:N2)="E"))* (TRANSPOSE(C2:O2)="A"))
I hope my advice will help you solve your task.
I want to count the number of specific values in a column (F:F) that fall between two dates (the start and finish of the month) contained in another column (H:H).
The values in F:F are one of 29 specificvalues and column H:H contains dates from 01/01/22-
31/12/22(updated daily)
I want to be able to count how many of the specific values F:F appear in any given month.
I can count each specific value F;F with the formula =COUNTIF('2022'!F:F,"*51/1 assault*")
I can count the total number of values F:F appearing between two dates with the formula =COUNTIFS('2022'!H:H,">="&DATE(2022,2,1),'2022'!H:H,"<="&DATE(2022,2,28))
But I just can't work out how to count a particular value in any given month.
Can you help me?
Hi!
Try to merge formulas:
=COUNTIFS(‘2022′!H:H,”>=”&DATE(2022,2,1),’2022’!H:H,”<="&DATE(2022,2,28),‘2022’!F:F,”*51/1 assault*”)
Kindly I need your help
My manager asked me about the excel sheet if we can fix .
the vacant bed which highlighted in green color in the excel sheet it is the result of difference of night shift census (J25) minus Total bed capacity bed(C25) minus total blocked bed (T25) . however he need if the night shift not filled the result will be day shift census minus Total bed capacity bed(C25) minus total blocked bed (T25) . If both them filled will be calculated only the night shift census (J25) minus Total bed capacity bed(C25) minus total blocked bed (T25) .
How we can do that in excel sheet
Hoping for your help in this matter .
Thank you very much
Best Regards
Hi!
Your description doesn’t give me a complete understanding of your task. You did not provide the addresses of all the cells, but the formula could be something like this:
=IF(J25<>"",J25-C25-T25,A25-C25-T25)
I recommend that you carefully study the article - How to use IF function in Excel
Hello!
Unfortunately, I could not understand your conditions for counting. Could you please describe it in more detail? Give an example of the source data and the expected result.
In process of creating a 'master sheet' with sheet one including the formulas, and sheet 3 being the sheet where the data exported will be pasted into. Then sheet 1 will display the results as a summary so I'm pulling the data from sheet 3 onto sheet 1 based on certain criteria.
D Contains the location - hall, court, room, upper, lower etc..
E Contains the age - 6,7,8,9, etc...
I Contains a range of various activities in the one field - rugby club, football club, handball, tennis club, dance club..etc...
I want to pull one age group (6) from every location except two only (Hall and Court) only IF if I contains certain activities (Football, Tennis or Rugby) from sheet 3, into sheet 1. I enter the below formula in the cell I want the data in sheet one, and it returns zero. Zero is incorrect as when filtered there IS fields that are age 6, location other than Hall or Court that have done either football tennis or rugby.
=SUM(COUNTIFS(Sheet3!$E:$E,"6",Sheet3!D:D,"*Hall*",Sheet3!D:D,"*Court*",Sheet3!I:I,{"*football*","*tennis*","*rugby*"}))
Hello!
Without seeing your data it is difficult to give you any advice. Perhaps the age in column E is written as a number. Replace the text "6" with the number 6 (without quotes).
Hi. My data range (A1:B300) has reference numbers in A, and text lines in B. In C5, I type a word, and I want to see in D5 the row(s) from the range having the word. COUNTIF tells me the number of times the word occurs in the range. Is there a formula I can use in D5, so that I can avoid having to use data filter on the range. Thanks.
Hello!
To get conditionally from a range of rows, you can use the FILTER function. You can find instructions and examples in this article.
I hope it’ll be helpful. If something is still unclear, please feel free to ask.
Hi - I need help with creating a tally based on date and time frames. I am trying to calculate how many flights are within a specific day in a column, but within each day, I need it broken up in intervals of time. For instance, I need every hour of each day. Let's say I am looking at 300 flight itineraries (all arriving within a 3 day period 4/2/2022, 4/3/2022, and 4/4/2022). I need to look at each day specifically and be able to break down how many people arrive at for example, 1 - 1:59 pm, 2 - 2:59 pm, 3 - 3:59 pm and so forth. I understand how to do the count ifs for a time frame, but how is there a way to include the conditional for the date.
Hello!
If the cell contains the date and time in the mm-dd-yyyy hh:mm:ss format, then you can write the condition something like this:
">="&(DATE(2022,4,2)+TIME(13,0,0))"
Please check out this article to learn how to insert time using the Excel TIME function.
Hello, I'm trying to figure out how to find matches between a cell containing multiple comma separated numbers and another cell containing multiple comma separated numbers.
Here is my example, cell 1 contains 12345, 12346, 12347, 12348,
cell 2 contains 54321, 12345, 65432, 23456, 12347
I want to do two things -
1. provide a true/false 1/0 answer in the cell if any number in cell 1 shows up in cell 2
2. in another cell count the number of matches between cell 1 and cell 2
I have had to break out the imported data and separate it out by commas manually, and it is time consuming. I figured I would reach out to people who are much smarter than me to get some insights.
Thanks for your time,
Jeremy
Hello!
You can split text by rows using the Split Text tool. Then compare 2 columns and determine the number of duplicates as described in this tutorial.
Unfortunately, this problem cannot be solved by ordinary Excel formulas. It is possible to write a custom VBA macro
Hi,
I'm trying to count data in an entire table based on a date, then return the total of this. This table has multiple rows for data from 01/2/3/4 of January and will continue.
The formula works whenever I change the date however, I want to count of data from another column, based on each [date].
Note these are all in the same table with rows appended each day.
For clarification I want to return the total of [Date] + return me total of [Status] on [Date]
Hello!
As I understand the problem, then you should use the SUMIFS function. You can learn how the SUMIFS function works with dates in Excel in this article on our blog.
Hi,
I was working on some calculations but unable to find the solution.
I want to count the number of days on which the minimum balance is maintained
For Example
On 1.12.21 on 2.12.21 on 3.12.21 Minimum Balance Remarks - Formula required
75 70 50 60 (Min balance maintained - 2 days)
50 60 45 70 (Min balance maintained - 0 days)
45 20 35 10 (Min balance maintained - 3 days)
Hello!
Based on your description, it is hard to completely understand your task. However, I’ll try to guess and offer you the following formula:
=COUNTIF(A1:C1,">"&D1)
If this is not what you wanted, please describe the problem in more detail.
Greeting,
I have datasheet i want to count the Age categories, related local and female.
Mean how many local female we have above 19 years to 48 years. below formula can't working.
=COUNTIFS('Datasheet'!E36:E139,"female",'Datasheet'!G36:G139,"19-48",'Datasheet'!H36:H139,"local")
Hi!
Instead of G36:G139,"19-48", use two conditions: G36:G139,">19", G36:G139,"<48"
I'm not seeing your data, but I think that will be helpful.
I have to calculate child spaces for a month. I used S as sick. We allow 5 sick days per child per month to be counted towards compensation, anything over 5 days is not counted. The formula I used to count days for present was =COUNTIF($B11:$AF12,"P"). But I cant figure out the S days to minus the 5 allowable days. Any help would be greatly apprecied
Hi!
I’m not sure I got you right since the description you provided is not entirely clear. However, it seems to me that the formula below will work for you:
IF(COUNTIF($B11:$AF12,”S”)>5,5,COUNTIF($B11:$AF12,”S”))
If this is not what you wanted, please describe the problem in more detail.
Hey there,
I have a data sheet with columns indicating characteristics that are labelled with numbers to indicate which characteristic. 1: Black 2: Yellow 3: Brown 4: White 1: Cat 2: Dog
I would like to find out which cells in the spreadsheet have the two matching characteristics.
eg. "black" "dog" So, the end goal is to have 1 number added to the answer box for each person in the survey who owns a dog that is black.
=countif(Data!R1:R99, "2", Data!Q1:Q99, "1")
Would you care to tell me what is wrong about my formula?
Hello!
To count on multiple conditions, use the COUNTIFS function. Please read the above article carefully.
Thank you so much!
The different between plural and non plural is what was holding me back.
This has helped me immensely and I am happy that you responded promptly.
Hello There,
I have multiple columns, example:
Code ; Environment; value
xyz; Dev;1
xyz; SIT;1
xyz; PAT;1
ABC;DEV;1
PQR;PROD;1
Now, i need to take only values which has Dev and either SIT or PROD or PAT, flag them True. if it is just Dev only they flag them False.
Need your guidance. thank you
Hello!
You can use the IF function with multiple conditions. I cannot offer you a formula, since your conditions are incomprehensible to me. On the first line, both TRUE and FALSE are true. If not, give an example of the result you want.
Hi, please help! I have 2 columns, Column A "Date" and B is status if "Passed/In Progress".
I need to count the number of "Passed" using a date range provided in a cell. Here's a sample:
COLUMN A. Column B. Column C. Column D Column E
10/1/2021 Passed 10/1/2021 10/30/2021 2
10/5/2021 In-Progress
10/10/2021. Passed
11/01/2021 Passed
Hello!
Please re-check the article above since it covers your task.
Here is one more article that may be helpful to you: COUNTIF formulas for dates.
I hope I answered your question. If something is still unclear, please feel free to ask.
My sample seems wrong didn't know spaces will be deleted after posting.
Column A "Date", Column B "Passed/InProgress", Column C and D "Date Range", Column E "Count Passed"
I need to know what formula am I going to use on Column E. Thank you so much!
I just found out the answer it's:
=COUNTIFS($B$2:$B$6,">="&$C$2,$B$2:$B$6,"<="&$D$2,$A$2:$A$6,"Passed")
Thanks!
Hi, I'm not sure how to put this in the formula and not even sure what function I need to use, can someone help me, please?
I have 2 sheets named and with column names below
Sheet 1 Name: Est Sheet (with data)
Column A: Facility Name (with data)
Column B: Department (with data)
Column C: Est Asset (with data)
Column D: Actual Asset (data needs to come from Sheet 2)
Sheet 2 Name: Asset Located
Column A: Asset Name
Column B: Facility Name
Column C: Department
I would like to pull out the total numbers of asset per facility and department from Sheet 2 and show it on Column D of Sheet 1.
How do I count the number of assets on each facility and department and pull out the sum to Column D of Sheet 1?
Help, please. Thank you!
Hello!
I kindly ask you to have a closer look at the article above.
Counting values according to two conditions:
=COUNTIFS(Sheet2!B2:B100,Sheet1!A2,Sheet2!C2:C100,Sheet1!B2)
can someone help me to get below result, count # of material based on two conditions.
detail
work order Date material
100 12-Oct ab
200 13-Oct cd
100 12-Oct ef
result
work order Date material
100 12-Oct 2
Hi!
You can use the formula
=COUNTIFS(A2:A100,100,B2:B100,DATE(2021,10,12))
If you need to calculate the unique values of materials, then I recommend the article: How to count unique values in Excel with criteria.
I hope my advice will help you solve your task.
I imported two separate reports into either same sheet or different sheets. Each report have in separate columns, b and ac, matching and unmatching number values. I need to identify a formula to return matching value from Report 1 (column b) Report 2(Column ac) to calculate total amount from Report 2 (Column ad if column b and column ac then match column e to column v and place total amount in column w) that matches the value from table array (column v match column e). As you can see below, in the table array (column v, data 3) matches from Report 1(column b, rev 3 and rev 7) with Report 2(Column ac, rev3) where the table array (data 3) calculates the total value to match all the criteria's of table 1 and table 2 and places the total amount from Report 2 (Column ad, $1.00 and $4.00). I hope this makes sense as this is difficult to explain.
Report 1 Table Array Return Value Report 2
Column b Column e Column v Column w Column ac Colum ad
rev1 Data1 data1 ($0.00) Rev3 $1.00
Rev2 Data6 data2 ($0.00) Rev4 $3.00
Rev3 Data3 data3 ($5.00) Rev5 $10.00
Rev4 Data4 data4 ($3.00) Rev7 $4.00
Rev5 Data2 data5 ($0.00) Rev10 $1.00
Rev6 Data1 data6 Rev12 $2.00
Rev7 Data3 data7 Rev15 $3.00
Hello!
Your request goes beyond the advice we provide on this blog. This is a complex solution that cannot be found with a single formula. If you have a specific question about the operation of a function or formula, I will try to answer it.
Hey,
I'm trying to use COUNTIF to look at 2 different collums and if both of the values are true to count, this is my formula but it is not working;
=COUNTIF('2021 Requests'!C6:C440, "Granted",'2021 Requests'!D4:D440,"07/01/2022")
Any help would be appreciated.
Needs to be COUNTFS not COUNTIF
also the range of C should be the same size as the range of D
so EX.
=COUNTIFS('2021 Requests'!C4:C440, "Granted",'2021 Requests'!D4:D440,"07/01/2022")
I have three colms
A B C
Loss amnt reason
Yes 100 Retrun
i have tried countifs( B1:B10,"<100",C1:C10,"return") but actual picture will be on the basis of Loss ( Yes or No). what is the formula for that.
Hi!
If you want to calculate the amount of losses, then use the SUMIFS function.
=SUM(COUNTIFS(D24,"*P*"),(COUNTIFS(D55,"*P*")),(COUNTIFS(D104,"*P*")))
I'M TRYING TO GET THE SUM OF DIFFERENT CELLS IN SAME COLUMN THAT IS MY SAMPLE FORMULA HOW CAN I SHORTEN IT IF I HAVE MORE THAN 20 LIST.. FOR THE FORMULA ABOVE THAT IS FOR MY FOREMAN THEY ARE "P" BECAUSE THEY ARE PRESENT I WANT TO COUNT THE PRESENT NO NEED FOR THE ABSENTS BUT MY HELPER IS 20 AND MORE I WANT TO TRY AND SHORTEN IT . I ALSO HAVE A FORMULA FOR MY 11 CARPENTERS
=SUM(COUNTIFS(D30,"*P*"),(COUNTIFS(D35,"*P*")),(COUNTIFS(D39,"*P*")),(COUNTIFS(D40,"*P*")),(COUNTIFS(D67,"*P*")),(COUNTIFS(D68,"*P*")),(COUNTIFS(D70,"*P*")),(COUNTIFS(D75,"*P*")),(COUNTIFS(D76,"*P*")),(COUNTIFS(D85,"*P*")),(COUNTIFS(D106,"*P*")))
IF YOU CAN HELP ME THAT WOULD BE A BIG HELP
TIA
Hello!
If your data is written in separate cells, you need to specify each cell separately. To reduce the formulas, you need to change the data table.
I did it by reading your article word by word haha thank you !
Thank you ! I did it by using countifs with multiple criteria
ANW I ALREADY GOT THE ANSWER TYVM <3
=COUNTIFS(D21:D118,"P",C21:C118,"CARPENTER")
Hello! I'm in need of a bit of help please :)
In my worksheet, I have a drop down list in row G10:CK10 for "Completed", "Ongoing", "Cancelled".
In the column G17:Y50, I have names of speakers, some of which are repeating names.
I would like to count the number of "Completed" events for each speaker. I have tried the COUNTIFS function, but unfortunately using the formula below it keeps returning as a VALUE error:
=COUNTIFs(G10:CK10, "Complete", G17:Y50, "Linda").
I would if you would be able to help?
Many thanks!
Hello!
You have different range sizes for the criterion and for the count, so the COUNTIFS function cannot be used.
If I got you right, the formula below will help you with your task:
=SUM(($B$10:$J$10="Complete")*($B17:$J50="Linda"))
I hope it’ll be helpful.
This is absolutely perfect! Thank you very much for your help!!
Hi,
please see below, i have 2 columns, first one are the jobs working on, second column is phases in the job, how i can sum, count each phase for this job repeating in the column? different jobs may have same phases, so need phase column be dependant on job column... please help
job phase
3156 112
3156 541
3137 541
3156 99020
3156 99020
3137 541
3137 541
3156 99020
wip wip
Hi!
I do not quite understand what you want to calculate. How to calculate the number of phases for each job is described in this article above. If you need to calculate an amount with multiple conditions, use the SUMIFS function.
Hello, I've searched multiple threads and cannot find a combination that might help my scenario. I'm using COUNTIFS successfully. Ex. =COUNTIFS(A:A,"employee",C:C,"product") But how can I add a third criteria that counts ''repair order" only once if it is replicated? I think the correct term is 'Distinct'.
Here is a small sample where the result = 6
However Repair Order 206189150 is duplicated so the desired result is = 5
employee repair order product
318 206188973 ABLAST
318 206189055 ABLAST
318 206189150 ABLAST
318 206189150 ABLAST
318 206189160 ABLAST
318 206189188 ABLAST
I hope this is clear and I'm sorry about formatting.
Thanks in advance! - Craig
Hello!
I recommend reading this guides: Count unique rows in Excel and How to count unique values in Excel with criteria. Use a formula like this:
=ROWS(UNIQUE(FILTER(A1:C6,A1:A6=318)))
I hope it’ll be helpful.
Hi there,
second day in a row, sorry about that.
Is there a way to search across multiple sheets (i know that is a VLOOKUP) but to return values from the search?
In this case I have data from various cities, (all sheets are the same layout) and i want to look up the Sector (coloum D) for say "Construction" and return the total cost across all sheets (column F)
Hello!
If the “Construction” value is written in different positions on each sheet, then I recommend using the Consolidate Sheets tool.
You can use the SUMIF function for each sheet and then summarize the results.
Hi there, Im trying to return a result if one 'phrase' is met, and then one do have a difference result if one of 5 others.
I had a try but seem to have failed miserably with the second criteria/calculation
please help
IF(SUM(COUNTIF(E3,{"*In work as a result of LVP*"})),B3,""),(SUM(COUNTIF(E3,{"*In work through other means*","*Awaiting a start date*", "*Out of work*", "*Health Condition*", "*Other*"})),(B3-(B3*2)),"")
Hi,
if I understood the problem correctly, try this formula:
=IF(SUM(--ISNUMBER(SEARCH("In work as a result of LVP",E3))),B3, IF(SUM(--ISNUMBER(SEARCH({"In work through other means","Awaiting a start date", "Out of work","Health Condition","Other"},E3))), (B3-(B3*2)),""))
Hi there,, Thankyou SSOOO much, thats amazing
I am trying to use the Countifs to count the number of cells that fall within a specific date range and are between two values.
Example: If I want to know how many cells are between 40 and 60 (Cell E) and between the dates of 3/1/21 and 3/31/21 (Column A)
Formula I have been trying to get to work is
=COUNTIFS($A$4:$A$1000000, ">="&G5, $A$4:$A$1000000, "<="&H5,$E$4:$E$1000000, "&=40")
however, its returning over 27K as the count. I know I only have 1365 cells in this date range.
Any help would be appreciate.
Thanks
Hi!
Please use the following formula:
=COUNTIFS($A$4:$A$1000000, “>=”&G5, $A$4:$A$1000000, "<="&H5,$E$4:$E$1000000, ">="&40,$E$4:$E$1000000, "<="&60)
I have a need for a 3rd criteria. Using your example I would want it to countif Susan has a project, with a start date, but no end date. The example I am looking at is under "How to use COUNTIFS with wildcard characters".
Hi Bryan,
Simply, use 3 range/criteria pairs:
=COUNTIFS(B2:B10, "susan", C2:C10, "<>"&"", D2:D10,"")
Could you please help me
If in One Column I have Y 2,Y 1,Y 6, N3 is there a way that i can sum the Numbers only
Hello!
If I understand your task correctly, the following formula should work for you:
=SUM((IF(ISNUMBER(--MID(CONCATENATE(A1,A2,A3,A4),ROW($1:$100),1)),--MID(CONCATENATE(A1,A2,A3,A4),ROW($1:$100),1),"")))
or
=SUM((IF(ISNUMBER(--MID(CONCAT(A1:A4),ROW($1:$100),1)),--MID(CONCAT(A1:A4),ROW($1:$100),1),"")))
I hope it’ll be helpful.
Hi,
I've been spending days on getting the formula right, but still uncertain how to get the right info.
I've got two columns with different dates: Start Date (A) & Resignation Date (B).
Currently using =COUNTIFS(A3:A143, "=",B3:B143,"=>1-90" but doesn't seem to give the right answer.
I would like to calculate how many people are resigning within 3 months, between 3-6 months, between 6-12 months. Any idea how the formula will look like?
Thanks.
Hello!
To calculate how many people are resigning within 90 days, use the formula
=SUMPRODUCT(((B1:B15-A1:A15)<90)*((B1:B15-A1:A15)>0))
I hope it’ll be helpful.
Hi Alexander,
Thank you so much, this is definitely working!! :)
Regards,
Cindy
Hi,
I have following large set of data.
Catalogue Lot Count
HBI66545 1320000531 2
HBI66545 1320000531 2
HBI66545 1320000531 2
HBI66545 1319000101 2
HBI66545 1320000531 2
HBI66545 1320000531 2
HBI66545 1319000101 2
I have used this formula to count.
=SUM(B2=$B$2:$B$18,(1/COUNTIFS($A$2:$A$18,$A$2:$A$18,$B$2:$B$18,$B$2:$B$18,$C$2:$C$18,$C$2:$C$18)),0)
But my problem is I would need sum of Catalogue and Lot which should be 5 for 1320000531 and 2 for 1319000101. Could you help me solving this?
Thanks heaps
Hi!
Your explanations are not very clear. I am assuming that you want to count the number of occurrences of a value. For example 1320000531.
A simple COUNTIF formula is suitable for this, as described in this article.
If this is not what you wanted, please describe the problem in more detail.
How can I use CountIFs function while counting the data of specific individual for a specific range of dates. Example, I have list of names in column A (from A2 to A20), their daily working hours is between column C2 to AF20 (31 days). Now I want to calculate number of days each individual did less than 5 hours shift, number of days an individual was not present in that month, total working days etc. I know I can do all these calculations for each individual at the end of the last column but I am pulling this data at another sheet and the names may not be in same order.
Is there any other way other than CountIFs? Any help would be appreciated.
I have a spreadsheet that i want to return a count across a row if two conditions are met.
please whats the best way to write this code =if(AC3="Reject", AF3="vendor", Count(f3:Y3))
when i wrote this code, i noticed the ones that met the condition only returned "True" instead of counting across the row, see below.
Number of Rejects Due Supplier
1
TRUE
5
TRUE
TRUE
Hi , i am looking formula to rid of all the duplicates & the originals in comparision data . some duplicates starts with "."
Just example
Existing:
a123.com
.a123.com
Comparing with
a123.com
I need to remove all "a123.com" . i have sheet of of 10000+ in existing & comparing have "2000+" .
how to remove the duplicates even it have "." in starting .
i am using the formula of -=IF(COUNTIF(A:A,A2)=1,0,1). it detecting the exact duplicates but not catching any thing with "." in starting.