Excel - 将大于或小于符号视为文本标准的一部分

San*_*eda 2 excel

我在MS Excel中有以下表格数据:

Doctor                  Patient Age Group
Doctor_Name 1            > 12 yrs old
Doctor_Name 2            < 06 yrs old
Doctor_Name 3            > 12 yrs old
Run Code Online (Sandbox Code Playgroud)

当使用此数据执行公式= COUNTIF(B2:B4,"> 12岁")时,它将返回3,而实际上它应该仅返回2.

Ron*_*eld 7

我不知道它在哪里记录,但该函数将>(大于)字符解释为运算符而不是字符串的一部分.尝试:

=COUNTIF($B$1:$B$8,"=" &"> 12 yrs old")
Run Code Online (Sandbox Code Playgroud)

如果运算符是文本字符串中的第一个字符,则它将被解释为运算符而不是字符.