DaF*_*oot 10 if-statement libreoffice libreoffice-calc
我正在努力实现以下目标:
= IF(N2 ="string1","high",IF(N2 ="string2"或N2 ="string3","中间","低"))
或者,在伪代码中:
String input = <some value>
if( input.equals("string1") ) {
return "high"
} else if ( input.equals("string2) || input.equals("string3") ) {
return "middle"
}
return "low"
Run Code Online (Sandbox Code Playgroud)
知道如何使用电子表格(理想的Libre Office Calc)公式而不是代码吗?输入变量显然是单元格引用.