【问题标题】:Google Sheet Formula for finding an element across multiple tabs用于跨多个选项卡查找元素的 Google 表格公式
【发布时间】:2019-08-02 00:03:01
【问题描述】:

我正在尝试在“表格”选项卡中的“产品销售日期”列 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 语句。 但是如果有多个标签,我会完全迷失

谁能提供建议?

我们应该考虑在这种情况下使用查询语句吗?

旁注:返回的值将是日期和字符的混合 [在市场/结束/即将到来/无数据/空/暂停/实际日期]

【问题讨论】:

  • 3)7)有冲突

标签: if-statement google-sheets google-sheets-formula array-formulas gs-vlookup


【解决方案1】:
=ARRAYFORMULA(
 IF(C2:C="Paused", C2:C,
 IF((A2:A="")+(B2:B=""), ,
 IF(A2:A >= TODAY(), "Upcoming",
 IF(B2:B <= TODAY(), "Ended",
 IF(A2:A  = TODAY(), "In Market", 
 IF(E2:E<>"", IFERROR(VLOOKUP(D2:D&E2:E, 
 {'Eaton Centre'!A2:A &"Eaton Centre",  'Eaton Centre'!B2:B;
  'Yorkdale Mall'!A2:A&"Yorkdale Mall", 'Yorkdale Mall'!B2:B; 
  'Vaughan Mills'!A2:A&"Vaughan Mills", 'Vaughan Mills'!B2:B}, 2, 0)), )))))))

【讨论】:

  • 感谢您的帮助!!,我想通了 :)
【解决方案2】:

你的公式是

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

【讨论】:

  • 其实我要进一步澄清这个问题......这很令人困惑
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-03
相关资源
最近更新 更多