首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在一个公式中超越更多条件?

在一个公式中超越更多条件?
EN

Stack Overflow用户
提问于 2016-09-19 17:34:32
回答 2查看 59关注 0票数 0

我能把这些条件放在一个公式里吗?

代码语言:javascript
复制
1. If the price (D2) is <= 20 and ROI (J2) is <= 10 then true or false.
2. If the price (D2) is between 20 and 60 and ROI (J2) is <= 5 then true or false.
3. If the price (D2) is between 60 and 150 and ROI (J2) is <= 4 then true or false.
4. If the price (D2) is between 150 and 500 and ROI (J2) is <= 3 then true or false.
5. If the price (D2) is >= 500 and ROI (J2) is <= 2.5 then true or false.
EN

回答 2

Stack Overflow用户

发布于 2016-09-19 17:55:30

根据您在此处提出的问题,公式如下:

代码语言:javascript
复制
=IF(AND(D2<=20,ROI(J2)<=10),"Output1",IF(AND(D2<60,ROI(J2)<=5),"Output2",IF(AND(D2<150,ROI(J2)<=4),"Output3",IF(AND(D2<500,ROI(J2)<=3),"Output4",IF(AND(D2>=500,ROI(J2)<=2.5),"Output5",FALSE)))))
票数 0
EN

Stack Overflow用户

发布于 2016-09-20 05:08:22

下面的代码略短一些,更易于阅读:

=IFERROR(“输出”&MATCH(1,(D2>={0,20,60,150,500})(D2<={20,60,150,500,99999})(J2<={10,5,4,3,2.5}),0),FALSE)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39569826

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档