首页 > 解决方案 > 用于跨多个选项卡查找元素的 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-statementgoogle-sheetsgoogle-sheets-formulaarray-formulasgs-vlookup

解决方案


你的公式是

=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"


推荐阅读