Home > OS >  Google Sheets: ArrayFormula w/ Multiple Conditions
Google Sheets: ArrayFormula w/ Multiple Conditions

Time:09-22

Google Sheet: using the formula below, I need it to return the # of records in F2:F214 with values of "11" or "22" or "33" that only have a value of "Y" or a "P" in H2:H214. H2:H214,{"Y"} but if I try H2:H214,{"Y","P"} I get a #VALUE! error?

=ArrayFormula(sum(COUNTIFS(F2:F214,{"11","22","33"},H2:H214,{"Y","P"})))

It's close, but I don't understand why adding the 2nd variable in the 2nd range throws it off?

CodePudding user response:

try:

=INDEX(SUM(REGEXMATCH(F2:F214&""; "11|22|33")*REGEXMATCH(H2:H214; "Y|P")))
  • Related