exceloperatorsformula

I want Excel to interpret an operator as a caracter in a formula


I have a form with answers such as: < 24
or > 20 kh

I want to count how many answer are of each type. I want to use a formula of this kind: =COUNTIF(EW5:EW150;"< 24")

but it seems that Excel treats "< 24" as: inferior to 24, whereas I want Excel to treat it as a simple string of characters.

How can I do this?

Thank you


Solution

  • If you apply SUM and IF separately the required result is returned.

    =SUM(IF(EW5:EW150="< 24",1,0))