将不相关的过滤函数组合到一个列表中。

huangapple go评论133阅读模式
英文:

Combining unrelated filter functions together for 1 list

问题

我正在寻找一种将两个不相关的过滤函数(过滤条件不同)合并为一个列表的方法,这两个函数来自于两个不同的数据源。我尝试过添加花括号,但这只会过滤掉两个列表,如果其中一个列表为假,那么两个列表都不会出现。

这是我尝试过的公式:

=iferror(FILTER({C3:D5;G3:G5},{B3:B5;F3:F5}={J2;I2}),"")
=iferror({FILTER(C3:D5,B3:B5=J2);FILTER(G3:G5,F3:F5=I2)},"")
=iferror(filter(C3:D5,B3:B5=J2),filter(G3:G5,F3:F5=I2))

英文:

Im looking to combine two filter functions that are unrelated to each other (not the same filtering criteria) to have one list but from two different sources. Ive tried adding curly brackets but that just filters both lists and if one of them is false, neither appear.

Screenshot of example

These are the formulas that I have tried:

=iferror(FILTER({C3:D5;G3:G5},{B3:B5;F3:F5}={J2;I2}),"")
=iferror({FILTER(C3:D5,B3:B5=J2);FILTER(G3:G5,F3:F5=I2)},"")
=iferror(filter(C3:D5,B3:B5=J2),filter(G3:G5,F3:F5=I2))

答案1

得分: 0

<!-- language-all: js -->

你可以尝试:

=ifna(vstack(
             ifna(filter(C3:D5,B3:B5=J2),tocol(,1)),
             ifna(filter(G3:G5,F3:F5=I2),tocol(,1)
             )))
英文:

<!-- language-all: js -->

You may try:

=ifna(vstack(
             ifna(filter(C3:D5,B3:B5=J2),tocol(,1)),
             ifna(filter(G3:G5,F3:F5=I2),tocol(,1)
             )))

huangapple
  • 本文由 发表于 2023年8月9日 00:22:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/76861470.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定