COUNTIF() with more than one conditions

Hi,

in a range I have characters: "H", "K", "Sze", "Cs", "P" so so in each cell
there is just one of these characters.

I want to count howmany cells are in a range that contains either of these
characters.

Can I do this in a more elegant way than by using this function bellow?

=COUNTIF(C152:C228;"=H")+COUNTIF(C153:C229;"=K")+COUNTIF(C154:C230;"=Sze")+COUNTIF(C155:C231;"=Cs")+COUNTIF(C156:C232;"=P")

What I would do is to add a column, fill it with AND() statement to mark
row to add or not, hide it, then use a COUNTIF() using this column as a
condition.

As far as I know, the COUNTIFS() function should do the job but for some
reason I have difficulties to make it works right now :\ you might want to
look into it.

Or if you have active regular expression (Menu/Tools/Options/LibreOffice
calc/Calculation)

=COUNTIF(C152:C228;"=H|K|Sze|Cs|P")

Inner help.

   Finds the terms that occur before the "|" and also finds the terms that

occur after the "|". For example, "this|that" finds "this" and "that".

Miguel Ángel.

Hi Miguel,

I have active regular expression (Menu/Tools/Options/LibreOffice
calc/Calculation)

so I can use

=COUNTIF(C152:C228;"=H|K|Sze|Cs|P")

function successfully.

Thanks!!

Hi :slight_smile:
Congrats :slight_smile: Another superb answer from Miguel Angel.
Congrats and regards from
Tom :slight_smile: