How to say find the word "Apple" or "Orange" by using or in the criteria instead of typing countif as another criteria? I mean adding OR in the same criteria.
=countif(A1:A100,"apple|Orange")
CodePudding user response:
use:
=COUNTIF(A1:A100, REGEXMATCH(A1:A100, "apple|orange"))
to make it case insensitive use:
=COUNTIF(A1:A100, REGEXMATCH(A1:A100, "(?i)apple|orange"))