Forum Discussion
amblee176
Sep 15, 2022Copper Contributor
CountIf and Sum(If( - Array help
I am attempting to count the number of unique participants that participated in submitting information upon their location, size and job code they are submitting. I have attempted sum(if( functions with countif in array formats, but am getting a zero response when I know there are participants.
I have Microsoft 365, using Excel. Not sure how to upload excel file.
For my WA, Large - Job Code 1
The result should be: 1
=arrayformula(SUM(IF(($G$2=$A$2:$A$251)*($A$2:$A$251=$G$1)*($A$2:$A$251>$G8),1/COUNTIFS($B$2:$B$251,$G$2=$B$2:$B$251,$D$2:$D$251,$D$2:$D$251=$G$1,$C$2:$C$251,$C$2:$C$251>$G8)),0)
Columns are:
Participants (4 digit numbers)
States (WA, OR)
Size (Small, Medium, Large)
Job code (numbers, up to 180)
amblee176 You can try any of below
=BYROW(G6:G8,LAMBDA(x,SUM(--(UNIQUE(FILTER(A:A,(B:B=$G$2)*(D:D=$G$1)*(C:C=x),""))<>"")))) =SUM(--(UNIQUE(FILTER(A:A,(B:B=$G$2)*(D:D=$G$1)*(C:C=G6),""))<>""))
13 Replies
Sort By
- Harun24HRBronze Contributorarrayformula() is formula of google-sheet. You need UNIQUE() with FILTER() function. Share a sample workbook so that we can check.
- DexterG_IIIIron Contributor
Here is a much easier method:
=ROWS(FILTER(Table4[Participants],(Table4[States]="OR")*(Table4[Size]="Small")*(Table4[Job Code]<90)))
To demonstrate, the formula under the Array heading shows the actual participant ID's that match all other criteria. While the formula under the Summarized header is that pasted above and simply counts the number of rows returned by the filter function.
Hope this helps.
Dexter
- amblee176Copper Contributor
Thanks. I've attempted to use the rows formula, not sure I did it right as no response.
- DexterG_IIIIron Contributor
amblee176 it appears I'm not able to access files within your organization. On the share settings before you copy the link, do you have it set to anyone with link can view/edit?