在Google表格中使用嵌套的IF

我正在尝试在单个单元中创建多个IF,因此,如果该单元状态为“严重”,则相邻单元应状态为“ 24小时内所需的响应”。如果单元格状态为“中”,则相邻单元格状态应为“ 48小时内所需的响应”。如果状态为“低”,则相邻状态应为“在其他优先级得到处理后所需的响应” ...如何创建该公式?

sodesune8899 回答:在Google表格中使用嵌套的IF

像这样:

=IF(A1="Critical"; "response required within 24hrs";
 IF(A1="Medium";   "response required within 48hrs";
 IF(A1="Low";      "response required after other priorites are addresse"; )))

对于这样的数组:

=ARRAYFORMULA(
 IF(A1:A10="Critical"; "response required within 24hrs";
 IF(A1:A10="Medium";   "response required within 48hrs";
 IF(A1:A10="Low";      "response required after other priorites are addresse"; ))))
,

如果您使用SWITCH语句而不是多个链接的IF,则会更容易。

通用公式如下:SWITCH(expression,case1,value1,[case2_or_default,…],[value2,…])

对于您的特殊用例,它看起来像这样:

=SWITCH([CELL-TO-COMPARE],"Critical","response required within 24hrs","Medium","response required within 48hrs","Low","Response required after other priorites are addresse")

玩得开心,欢呼

本文链接:https://www.f2er.com/3109776.html

大家都在问