Which to use--COUNTIF, COUNTIFS, or SUMPRODUCT? - excel-formula

I am tracking trouble ticket survey responses. I want to count the number of ticket id's (INC0....) where the ratings for any of the four survey questions associated with that singular trouble ticket are <=6. I need to do this across multiple worksheets and multiple columns.
Example:example worksheet
WorkSheet1
Column I = ticket number (INC0001234, INC0001235, etc.)
Column Q = Customer's rating for 1st survey question
Column S = Customer's rating for 2nd survey question
Column U = Customer's rating for 3rd survey question
Column W = Customer's rating for 4th survey question
The same exists for all other worksheets (WorkSheet2, WorkSheet3, etc.)
I have found a formula that will work only if I count against one worksheet and/or column.
Example: =COUNTIFS('WorkSheet1'!$I:$I,"INC0*",'WorkSheet1'!$Q:$Q,"<=6")
This formula I tried but doesn't work:
=COUNTIFS('WorkSheet1'!$I:$I,"INC0*",'WorkSheet1'!$Q:$Q,"<=6",'WorkSheet1'!$S:$S,"<=6", 'WorkSheet1'!$U:$U,"<=6",'WorkSheet1'!$W:$W,"<=6")

Not clear why at the end of your example your WorkSheet1/Column I contains the number to be sumed when your example puts the Ticket number in column I.
In any case, you can't do it in one single cell. You will need at least one helper column. In column X, input :
=IF(MIN(Q1:W1)<=6,SUM(Q1:W1),0)
This will give you the sum of all ratings on the line if one of them is 6 or lower. You can then sum column X to get your total rating sum, wich looks like what your trying to get by summing your column I at the end of your question.
Your Countifs formula doesn't get you what you want because it is looking for a line meeting all criterias (e.g. all 4 ratings must be below or equal to 6) and will return the number of occurences where this happens. Sumifs would have gotten you closer, but again, it would have check when multiple criteria are met and then sum a range when this happens. Sumproduct is not well adapted to this circumstance where you have to sum all cells based on the individual content of any cell in the range.

If all the ticket id's in rows are unique, you can use just, formula in column Y, =Countif(Q2:W2,"<=6") and drag it down.

Related

IF all cells in a range are the same, excluding blank cells

I have a table to calculate the price of a project, where one column is the description of an element of the project followed by a column for its unit (usually hours), the price per unit, number of units, and the final price,
sort of like this:
My question really only involves the highlighted cells. Im making a template, and I add elements to the table as I go along, so some rows are left blank, but I want the total number of hours to be displayed in D7 (easy enough, =SUM(D2:D6)), but my problem is that some of the elements aren't written per hour (eg. row 4), so I want the total to only show up if all the values are for hours. Essentially:
IF all values in row B are "Hours", then sum of row D, else "")
I guess in short, is there a formula I can use that would return TRUE if all the values in a range are the same, excluding blank cells?
Thanks.
As per your last comment, you can try:
Formula in D7:
=IF(COUNTIFS(B2:B6,"<>Hours",B2:B6,"*")=0,SUM(D2:D6),"")

Excel Function for looking at text in a cell

My goal is to enter in column E on sheet 2 whether or not the customer used the discount code "BUNDLE3".
I would like to look at the order number in sheet 2 represented by column A then look at Column A in sheet 1 (where my orders data is) and if they match, then look at column M(discount code column in sheet 1) and if Column M has the text "BUNDLE3" then return Yes, if not return No.
The formula I was using is the one below, where orders_export_1 is sheet 1. It doesn't work because its not looking at the order numbers at all.
=IF(ISNUMBER(SEARCH("BUNDLE3",orders_export_1!M2)), "Yes", "No")
Please refer to image links for more clarity.
sheet 2, where I am trying to use an excel function in order to find out if an order (represented by column A) used the discount code "BUNDLE3"
sheet 1, This is my orders data. Sometimes orders take up multiple rows since they are listing the products customers have purchased.
In Sheet2, E2, put this formula and drag down:
=IF(COUNTIFS(orders_export_1!$A$2:$A$100,A2,orders_export_1!$M$2:$M$100,"BUNDLE3"),"Yes","No")
Adjust the range on orders_export_1 as needed.

Excel: Count Unique Values with Critera

I am trying to write a formula that will count unique values (both text and numbers) in a range that also has blank fields with a set of criteria.
Criteria:
Shipment Type = Specific Transport Type
Status Column = "Unplanned"
Despatch Month = Specific Month
This is very easy to execute with a pivot table. However I want to be able to write a formula instead, as I don't like the idea of having to refresh a pivot table every time new data is added.
Here is the formula I have written for Unplanned Shipping by Cost for Truck 2018-03 in cell I15:
=SUMIFS($F:$F,$C:$C,I$14,$A:$A,$H15,$B:$B,"Unplanned")
The same logic doesn't really apply when writing a =COUNTIFS formula to measure unique consignments as the unique values with blanks fields adds a layer of complexity.
to count the number of record where D:D is not blank:
write in cell I7 =countIFS($D:$D,"<>"&"",$C:$C,I$6,$A:$A,$H7,$B:$B,"Unplanned")

Excel Formulas for two workbooks-multiple criterias

So I have this huge report and I'm looking to analyze it better. I have Data in one work book (1)and I'm creating a separate workbook (2) to reflect certain criteria.
Workbook 1-I have Data in Col A, Col B, Col C.
Column A has abbreviated businesses (ex. Abc, Def, Ghi)
Column B has Dates for everyday of last year and this year (ex.1/3/2017)
Column C has Y or N values.
Workbook 2- In work book 2, I need data from the previous month, of a particular business (Abc) with just values equal to Y
You should make a pivot table that contains the data you want, and then double click the cell containing the data meeting your criteria and it will pull up the source data for only those criteria. That's a pretty simple way to do it.
i.e. Make a pivot table in Workbook 1 with a month filter, a business filter, and a values equal to Y filter.
EDIT:
I took a stab at it without getting your specifics. Images including formula are attached.
Sheet1 contains the data. Sheet2 calculates the sum for the month for each business.
These are array formulas and require you use ctr+shift+enter to confirm the cell. Then you can drag down for month and business as needed.
{=SUM(IF(Sheet1!$A$2:$A$43=A2,IF(Sheet1!$B$2:$B$43>=D2,IF(Sheet1!$B$2:$B$43<=E2,Sheet1!$C$2:$C$43))))}
NOTE: My sheet1 only went down to row 43, hence the $43 in the equation. You'll need to replace those values with your values.
This also assumes that you are using dates down to the day. If you have a column that is for Months, and it's text, then you can nest an IF($B$2:$B$43="January", .... or however you have your months defined.

need the cound of Row C if the condition of Row A and B is match

IN row A i am having Date (Date might be today's date, yesterday’s date and day before yesterday's date)
In Row B i am having person name (Name Can be Arindam , Samir,Amit,Din
In Row C I am having the work status (Ctatus Can be Closed,Work in progress,Waiting,New
Now I want the Close Count status of Row C in Row D, but condition should be” if Row A is today's date and Row C is Arindam.”
Is it possible by excel formula?
Please help me out
This works for me, but there are a LOT better ways to organize your data (like with Tables and named Columns) that will make this kind of thing easier.
=IF(AND(A1=TODAY(), B1="Arindam"), C1, "")
You can "fill" that formula down the whole column D and the row number will auto-adjust. You might need to edit the A1/B1/C1 to match the row you actually paste this into (probably row 2 or greater, if you have a header row).
Op asked a follow-up that couldn't be easily answered in a comment.
From Excel help:
The COUNTIF function counts the number of cells within a range that
meet a single criterion that you specify.
COUNTIFS is a more complex variation of that.
For the original example given, the simple IF() above works correctly. COUNTIF is meant to count the NUMBER of cells (not to sum them) that meet certain criteria (like Date>Today, Count>3, or anything). There is a SUMIF that will sum up cells, but you didn't say you want to sum up cells, you said wanted the "Close Count status of Row C in Row D".
If instead you want a cell (not necessarily in column D, associated with the data in a single row) that "sums" up all of a given Close Count on a page, you could do this:
=SUMIFS(C:C,A:A,"="& TODAY(),B:B,"Arindam")
That's really great for a summary of ALL the rows of data, but it sounded like you wanted a summary per row, for which you should use the simpler IF() given above.
OK, one more update, now that I'm understand the original data better. This can be done in EACH row, and if you really want a total for the entire set of data, you'll have to have a total row (or separate sheet) that adds up column D:
=IF(AND(A1=TODAY(), B1="Arindam", C1="Closed"), 1, "")
This puts a "1" in column D if the criteria in columns A, B, and C match what you want.
If you want a single cell that sums up all the matches, then Jerry gave the correct answer (this is from him, and I think it's the best answer, although it was in the comments):
=COUNTIFS(A1:A10,TODAY(),B1:B10,"Arindam",C1:C10,"New")

Resources