"1" If "B1" is "x" and "A1" -6ren">
gpt4 book ai didi

excel - Excel中的三个IF语句

转载 作者:行者123 更新时间:2023-12-02 13:45:15 30 4
gpt4 key购买 nike

我需要编写一个 IF 函数来执行以下操作。我有两个参数:

A: x
B: x

If "A1" is "x" and "B1" is "" -> "1"
If "B1" is "x" and "A1" is "" -> "2"
If "A1" and "B1" is "x" -> "3"
If in "A1" and "B1 is nothing -> "4"

我想出了这个函数,但它不能正常工作:

=IF(A1="x";"1";IF(B1="x";"2";IF(A1="x";"3";"4")))

最佳答案

这行得通吗:=IF(AND(A1="x",B1="x"),"3",IF(AND(A1="x",B1=""),"1 ",IF(AND(A1="",B1="x"),"2","4")))

关于excel - Excel中的三个IF语句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38977652/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com