Countif but with one criteria over multiple ranges?
Using COUNTIFS with two different ranges.
COUNTIF for multiple ranges issues
arrays - COUNTIF over multiple non contiguous ranges and with one condition in Google sheets - Stack Overflow
Is there a way to use a countif function, or a function like it, to check for a certain criteria over multiple ranges? All I can find is using it for one criteria over one range, or multiple criteria over multiple ranges.
Hello!
I'm trying to make a COUNTIF function that meets two criteria.
The first criteria can appear in 1 of 6 columns while the second criteria can only appear in 1 column.
Every time I write the function, I get an error stating that " Array arguments to COUNTIFS are of different size."
Is there a way to work around this error?
The function I wrote is as follows:
=SUM(COUNTIFS({'Game Logs'!H:H,'Game Logs'!L:L,'Game Logs'!P:P,'Game Logs'!T:T,'Game Logs'!X:X,'Game Logs'!AB:AB},"*"&U4&"*",'Game Logs'!C:C,"Hnard"))
Thanks!
Hello all!
So I am working on a spreadsheet and am having some issues with my formula.
What I want it to do is check 3 separate ranges (in my case it is B6 to B7, E6 to E10, and H6 to H31), and if the term DH* (any variation) is found in any cell in any of those ranges, it returns a check mark (✔) or if term is not found, it returns a cross mark (✘).
Not working formula I currently have: =IF(COUNTIFS(B6:B7,E6:E10,H6:H31,"DH*"),"✔","✘")
The cell the formula is currently in is K16.
Link to full spreadsheet: https://docs.google.com/spreadsheets/d/1MqGbv-2tt2e-4nZohjNA8ixel3MPlkDKdutKBgrLmBk/edit?usp=sharing
Thanks so much in advance, I've been wracking my brain with this for a while and am not sure if if/countif is the correct function.
perhaps you overthinking it:
=COUNTIF(B:B; "Brazil")

update:
=COUNTIFS(B:B; "<>Brazil"; B:B; "<>")

You don't even need INDIRECT: Just =COUNTIF({B1:B2;B3:B5;B7:B9},"<>Brazil") will work.
To create skips, use FILTER+SEQUENCE.
For eg, This skips row 3 and 6:
=LAMBDA(ar,len,COUNTIF(FILTER(ar,SWITCH(SEQUENCE(len),3,0,6,0,1));"<>Brazil"))(B1:B9,ROWS(B1:B9))
Or with a named function:
SKIP(arr,rows_to_skip):=FILTER(arr, MAP(SEQUENCE(ROWS(arr)), LAMBDA(n, AND(MAP(rows_to_skip,LAMBDA(s, s<>n)))) ) )Then,
=COUNTIF(SKIP(B1:B9,{3,4,6}),"<>Brazil")Skips row 3, 4 and 6 in the array
B1:B9