I am basing my question on the instructions that I found at this link
on eImagine.
I followed the instructions to return lists based on one criteria item. It worked well. The initial formula is below:
{=IF(ISERROR(INDEX('Data 6.26.18'!$A$2:$AR$6000,SMALL(IF('Data 6.26.18'!$V$2:$V$6000=Summary!$A22,ROW('Data 6.26.18'!$V$2:$V$6000)-1),COLUMN()-3),14)),"",INDEX('Data 6.26.18'!$A$2:$AR$6000,SMALL(IF('Data 6.26.18'!$V$2:$V$6000=Summary!$A22,ROW('Data 6.26.18'!$V$2:$V$6000)-1),COLUMN()-3),14))}
However, when I tried to add a second criteria item, things didn't work as well. I assume that the SMALL function doesn't work well with AND statements, and piling wild card logic on top of that might not help. The formula that I attempted is below:
{=IF(ISERROR(INDEX(Current!$A$2:$AQ$6000,SMALL(IF(AND(Current!$V$2:$V$6000=Summary!$A17,Current!$S$2:$S$6000="*Open/Active*"),ROW(Current!$V$2:$V$6000)-1),COLUMN()-3),14)),"",INDEX(Current!$A$2:$AQ$6000,SMALL(IF(AND(Current!$V$2:$V$6000=Summary!$A17,Current!$S$2:$S$6000="*Open/Active*"),ROW(Current!$V$2:$V$6000)-1),COLUMN()-3),14))}
Can anyone help me understand what I might need to do make this work? For clarity, I pulled these two formulas from different cells that match on different reference cells ($A$17 and $A$22). Otherwise, I am hoping to make the latter input formula work for both cells.
Please let me know if further background on the referenced spreadsheet would help.
You may try to incorporate another IF() within your IF() since AND() doesn't work with arrays. So basically, it would look like:
IF(Current!$V$2:$V$6000=Summary!$A17,IF(Current!$S$2:$S$6000="*Open/Active*",....
Or you could as well try:
IF((Current!$V$2:$V$6000=Summary!$A17)*(Current!$S$2:$S$6000="*Open/Active*"),...
Tested the first one as working, but haven't really tried the second one. It would be great if the second one did work since it's easier to understand.
Related
I have tried 2 approaches to my problem and can't quite figure out where I'm going wrong.
=AVERAGEIFS(CALC!L:L,CALC!C:C,Consignee!A2,CALC!K:K,CALC!A:A) and =IF(AND(Consignee!A2=CALC!C:C,CALC!K:K=CALC!A:A),AVERAGE(CALC!L:L),0)
Basically I need to start with CONSIGNEE!A2, then find it's match in CALC!C:C, which I then need to check against CALC!A:A to find the ones that go with it in the same row and see if that/those cell(s) match any in CALC!K:K and then take the average of the corresponding values in CALC!L:L and average them. I hope that makes sense. I feel like I've gotten close but am missing something.
Thank you in advance for your help!
I suspect that the formula below may not be the most efficient possible but it will do the job.
=SUMPRODUCT((CALC!A:A=CALC!K:K)*(CALC!C:C=CONSIGNEE!A2),CALC!L:L)/SUMPRODUCT((CALC!A:A=CALC!K:K)*(CALC!C:C=CONSIGNEE!A2))
Edit
In my original answer a reference to L1 was erroneously left over from the formula I tested where I had L1 taking the place of CONSIGNEE!A2. I have corrected this error and believe that the formula works fine for your requirement now.
Note that there are two separate SUMPRODUCT functions which you can test each by itself, one returning the count, the other the sum. If the count = 0 a #DIV/0 error will occur. You can prevent that by embedding the formula in and IFERROR() function.
I need to count how many cells in a table column that contains a specific text string. I'm using this formula and it works well:
=COUNT.IF(TB_table_name[col_name];"*string_to_be_found*")
But I need to count only filtered cells.
I've found may solutions (using SUMPRODUCT) on internet, but only to common cells and not table conlumns.
This is the kind of table that I have:
As you can see, there are many values in the same cell (It happens because it is generated automatically by a survey made in MS Forms). Because of this, I need to search for a specific string to be counted.
Using "COUNT.IF" I have this results:
Please observe that the values in the cell are not random, but predefined - of course the sequence could not be the same, but the list of possible terms are.
Please, can you help me figure this out? Belive me, I have tried many things but nothing worked and it seems to be a thing so easy to achieve :(
The trick is to combine a couple of the ideas you found using SUMPRODUCT.
You likely found this reference (or one just like it) that gave guidance for a formula like this:
=SUMPRODUCT(SUBTOTAL(3,OFFSET(B2:B7,ROW(B2:B7)-MIN(ROW(B2:B7)),,1))*(B2:B7="Quality"))
Which translates to your problem-space like this:
=SUMPRODUCT(SUBTOTAL(3,OFFSET(TB_table_name[col_name],ROW(TB_table_name[col_name])-MIN(ROW(TB_table_name[col_name])),,1))*(TB_table_name[col_name]="*string_to_be_found*"))
This works perfectly fine if you're NOT using a wildcard search. But that's what you need. So in this answer it shows that the wildcard in a SUMPRODUCT needs to use the -- operator. So the result is to combine the two answers and you get:
=SUMPRODUCT(SUBTOTAL(3,OFFSET(TB_table_name[col_name],ROW(TB_table_name[col_name])-MIN(ROW(TB_table_name[col_name])),,1))*(--(ISNUMBER(FIND("string_to_be_found",TB_table_name[col_name])))))
Notice that the string_to_be_found does NOT have wildcard * specifiers. That's taken care of by the FIND function.
I would first like to apologize if this question has already been posted and answered numerous times but I was unable to find the right wording for my question to find a thread that matched.
I have a Sumproduct formula with multiple criteria that helps identify the number of issues I have on the main spread sheet. I got the number of issues, however now I would like to identify the cells meeting this criteria. Is there any way to do this?
To further explain my intention, the main tab on my spread sheet is a report with many different columns that would need to be filtered several different ways each time in order to catch the exceptions we are looking for. I am trying to avoid this manual process by creating a new tab to show these exceptions without having to look for them and leave cause for any user/human error where something could potentially be missed. In a new tab, I used several formulas (like the one below) to determine the number of different exceptions we need to catch, however I am wondering if there is a way to also identify these specific cells that the exceptions fall in so that the user can immediately locate and correct it.
For example: 2 issues identified; B10 and B26. (Or more specifically, if possible, the contents of that given cell?)
Sumproduct:
=SUMPRODUCT(--(May!C2:C452="FHA"),--(May!Z2:Z452<>""),--(May!AB2:AB452<>""),--(May!AC2:AC452=""))
Note: I have also tried to achieve this by using conditional formatting using the formula above, however the issue that I run into with that approach is that the entire row gets highlighted instead of the specific cells matching the criteria from the formula. I am open to a solution with this as well if it is an easier approach.
I hope I am getting across what I am trying to do! Thank you in advance to whomever can help!
Consider adding an additional column to the May worksheet. The new column would contain formulas like:
=(C2="FHA")*(Z2<>"")*(AB2<>"")*(AC2="")
If you AutoFilter on this new column, you will see all the contributors to the SUMPRODUCT() formula.
Your 2 issues identified; B10 and B26 appears to refer to cells that have no bearing on what you seek to achieve so I may have misunderstood but suggest selecting A:AC and applying a CF formula rule of:
=AND($C1="FHA",$Z1<>"",$AB1<>"",$AC1="",OR(COLUMN()=3,COLUMN()=26,COLUMN()=28,COLUMN()=29))
First post, but I am stuck and was hoping for some help. What I am trying to do is use a nested IF formula to determine whether the value returned by a VLOOKUP matches specific text on another sheet in the same workbook. If it does, to then use the COUNTIFS function to determine the sum of instances that specific text contained in a specific cell appears on another sheet (also in the same workbook).
One part of these formulas seems to work, but when I combine it with others, it errors and I can't figure out why.
It's probably something simple, but I'd appreciate any help. Here's the part that seems to "work"
=IF(VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="All",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")
+
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")))
If I put one more parenthesis, it works as is, but seems to omit some of the "All" Vlookup results... thus why I put works in quotations above. That might be an issue with my spreadsheet though, but felt I should include in case I'm just being idiotic. Regardless, when I input two additional IF statements, it errors.
The final formula I've crafted looks like this (double spaced for ease of reading only):
=IF(VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="All",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")
+
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")))),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="One",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="Two",
(COUNTIFS('Sheet2'!$R:$R,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY"),
IF((VLOOKUP($A3,'Sheet1'!$B:$D,3,FALSE)="Three",
(COUNTIFS('Sheet2'!$U:$U,'Sheet3'!$A3,'Sheet2'!$C:$C,"MM/DD/YYYY")),"0"))
Any ideas?
Thanks!
Ryan Olson
Just cleaned up some bracketing. Let me know how it goes as I didn't alter the formula otherwise.
=IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="All",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY")+(COUNTIFS(Sheet2!$R:$R,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY")),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="One",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="Two",
COUNTIFS(Sheet2!$R:$R,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),
IF(VLOOKUP($A3,Sheet1!$B:$D,3,FALSE)="Three",
COUNTIFS(Sheet2!$U:$U,Sheet3!$A3,Sheet2!$C:$C,"MM/DD/YYYY"),"0"))))
I have the following sheet structure:
What I need to find out is, whether code 8101-1101 contains any Matching Projects (in our case 9500-1100). I have tried VLOOKUP formula, however that only works if the matching project is set to the very first item. If matching project exists only somewhere in the middle, then the formula fails. I have also tried SUMIF yet with no luck.
What formula do I need to use, to check this particular example?
As we discussed in the comments, the easiest way to accomplish what you're looking to do would be using the COUNTIFS() function.
Given your example, your final formula would be as follows:
=COUNTIFS(B:B,B2,I:I,"<>")
Good luck and glad it ended up working for you!!