如何根据多个条件向数字添加多个值?

时间:2017-11-04 21:58:33

标签: excel excel-formula formula countif

我有以下表格:

spreadsheet example

我想要做的是以下流程:

如果C2 = N,则将50添加到B2
如果D2 = N,则将50添加到B2
如果E2 = N,则将50添加到B2
如果F2 = N,则将50添加到B2

因此,例如,对于第2行,I2中的结果将是

900 + 50(D2 = N)+50(E2 = N)+50(F2 = N)= 1050

我如何通过公式实现这一目标?

2 个答案:

答案 0 :(得分:3)

请尝试:

"terminal.integrated.shell.linux": "/bin/bash",
"terminal.integrated.shellArgs.linux": [ "-c", "exec pwsh -noexit -command 'set-location \"$PWD\"'" ]

答案 1 :(得分:2)

这必须进入I2

=B2+IF(C2="N",50,0) +IF(D2="N",50,0)+IF(E2="N",50,0)+IF(F2="N",50,0)
相关问题