if-statement - 用于跨多个选项卡查找元素的 Google 表格公式
问题描述
我正在尝试在“表格”选项卡中填充 F 列“产品销售日期”中的值
基本上……逻辑如下:
1) If Column C (Product Status) = "Paused", then return "Paused"
2) If Product start date = NULL or Product end date = NULL, then return NULL
3) If Product start date < today`s date, then return "No Data"
4) If Product start date >= today`s date, return "Upcoming"
5) If product End date <= today`s date, return "Ended"
6) If product start date <= today`s date, return "In Market"
7) If the condition does not belong to any of the above cases, then return the actual Product launch dates
下面是我正在处理的示例数据的链接。
我正在粘贴链接本身,因为包含多个选项卡
https://docs.google.com/spreadsheets/d/120rHOt8Pa_PdMKPgLkSYOKTO2Cv1hBH6PpTrg7FfJLk/edit?usp=sharing
最终,我需要通过扫描每个选项卡中的数据来填充实际的“产品发布日期”
我尝试使用带有索引匹配组合的嵌套 if 语句。但是如果有多个标签,我会完全迷失
任何人都可以请提供建议吗?
在这种情况下,我们是否应该考虑使用查询语句?
旁注:返回的值将是日期和字符的混合 [In market/Ended/Upcoming/No Data/NULL/Paused/Actual Date]
解决方案
你的公式是
=IF(C2="Paused",C2,if(OR(A2="",B2=""),"",IF(A2<TODAY(),"No Data",IF(A2>=TODAY(),"Upcoming",IF(B2<=TODAY(),"Ended",IF(A2<=TODAY(),"In Market","Actual Product Launch dates"))))))
在上面的公式中,您应该使用查询公式代替“实际产品发布日期”来提取实际日期。
但是第 3 点和第 6 点没有任何意义。第 6 个条件应该是If product start date = todays date, return "In Market"
推荐阅读
- java - 为什么 Java 没有 EmptyQueueException?
- webstorm - WebStorm 2018.3 Run/Debug 启动直接报错
- java - 多个类的静态引用
- typescript - Angular 6读取XLS文件并将其保存到变量中
- html - 使用 CSS 实现百分点
- sorting - 数据表 - 包含年龄范围/YADCF 累积过滤器的排序列(使用 columnDefs )
- php - 使用完全限定路径名 (FQPN) 请求文件时是否执行任何类型的搜索
- c - 带有循环的 C 程序中的老虎机
- javascript - 在MYSQL数据库中导出并使字符串有效期为7天
- amazon-s3 - S3 在 CSV 文件上选择 - 如何匹配子字符串