0

I have this table below:

A       B           C
Date .  Place       Person
1/1  .  DOU,DORS    John
1/1  .  DOMG,DOSP   Mark  
2/1  .  DOU,DOSP    Alex
1/1  .  DOU         John

I need a formula to COUNTIF "Date" is 1/1 and if inside "Place" the string "DOU" is present (I need to do that dynamically with multiple dates and strings, just using this example to simplify).

So basically something like COUNTIFS(B:B;"DOU";A:A;1/1) = TRUE

I tried COUNTIFS(B:B;"DOU";A:A;1/1) but it didn't work out because it only works with exact matches and not partial strings. If I use REGEXMATCH(B2;"DOU") I get TRUE, however, I didn't find a way to insert REGEXMATCH inside COUNTIFS to make it in volume and dynamically. Is there a way to do that? If there is not, is there any way to make this operation?

Also, I tried to use the answer in this post however it didn't work out right from the beginning. I'm trying to do COUNTA(FILTER(B:B;REGEXMATCH(B:B; "DOU"))) but it is always 1 having or not having "DOU" in the column.

player0
  • 124,011
  • 12
  • 67
  • 124
aabujamra
  • 4,494
  • 13
  • 51
  • 101

2 Answers2

3

Alright, I found it out by myself. Solved my problem using COUNTIFS(B:B;"*DOU*")

aabujamra
  • 4,494
  • 13
  • 51
  • 101
0

basically, you need this:

=COUNTIFS(B:B; "*DOU*"; A:A; "1/1")
player0
  • 124,011
  • 12
  • 67
  • 124