Google Spreadsheet filter doesn't allow wildcards? How to count multiple columns using wildcards?

When I do this:

B         C
223 herp
223 herp
3   herp
223 derp
223 herp,derp

=countif(C:C, "*herp*")

I get 4 correctly.

When i do

=count(filter(B:B, B:B=223, C:C="*herp*"))

I get 0. incorrectly. When I remove the wildcard characters "*", I get 2, which is better, but does not get herp, derp.

Does the filter not support wildcards? If so, how can I count a row only if two of the columns match two different criteria that have wildcards?

+4
source share
1 answer

FILTER does not support wildcards, no. You need to do something like:

=COUNT(FILTER(B:B,B:B=223,SEARCH("herp",C:C)))

or

=COUNT(FILTER(B:B,B:B=223,REGEXMATCH(C:C,"herp")))

COUNTIFS:

=COUNTIFS(B:B,223,C:C,"*herp*")

+6

Source: https://habr.com/ru/post/1523621/


All Articles