【问题标题】:Arrayformula to compare two columns and skip blank cellsArrayformula 比较两列并跳过空白单元格
【发布时间】:2019-01-14 18:15:11
【问题描述】:

我在两张不同的工作表上有两列,其中包含一长串值;我正在尝试比较这两列以检查第一列中的条目是否存在于第二列中。第一列也有空白单元格。

我尝试了不同的公式,但它们都返回空白单元格的值,而不是空白单元格。

这些是我尝试过的公式:

=arrayformula(iferror(if(match(A1:A,AnotherSheet!A1:A,0),"yes"),"no"))

=query(arrayformula(iferror(if(match(A1:A,AnotherSheet!A1:A,0),"yes"),"no")), "Select * where Col1<>''")

=query(arrayformula(iferror(if(match(A1:A,AnotherSheet!A1:A,0),"yes"),"no")), "Select * where Col1 is not empty")

他们都为第一列中的空白单元格返回“否”,我希望有一个空白单元格。谢谢

【问题讨论】:

  • 我找到了一个公式,但仅适用于“是”值:=arrayformula(iferror(if(match(A1:A,AnotherSheet!A1:A,0),"yes","no")));如何让它返回“no”值?

标签: google-sheets google-sheets-formula


【解决方案1】:
=ARRAYFORMULA(IF(LEN(A1:A), IFERROR(IF(MATCH(A1:A, AnotherSheet!A1:A, 0), "yes"), "no"), ))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-11-15
    • 1970-01-01
    • 2021-03-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多