gpt4 book ai didi

if-statement - 数字范围之间的多个 IF 语句

转载 作者:行者123 更新时间:2023-12-04 03:19:41 24 4
gpt4 key购买 nike

我正在尝试在数字范围之间设置具有多个 IF 语句的公式,但我看到了错误:

Formula parse error



这里是论坛:
=IF((AND(A2>0,A2<500),"Less than 500",
If(AND(A2>=500,A2<1000),"Between 500 and 1000"),
If(AND(A2>=1000,A2<1500),"Between 1000 and 1500"),
If(AND(A2>=1500,A2<2000),"Between 1500 and 2000")))

最佳答案

由于嵌套的 IF,这有点棘手,但这是我的答案(已在 Google 电子表格中确认):

=IF(AND(A2>=0,    A2<500),  "Less than 500", 
IF(AND(A2>=500, A2<1000), "Between 500 and 1000",
IF(AND(A2>=1000, A2<1500), "Between 1000 and 1500",
IF(AND(A2>=1500, A2<2000), "Between 1500 and 2000", "Undefined"))))

关于if-statement - 数字范围之间的多个 IF 语句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25587898/

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