简体   繁体   English

使用另一个列表中的值过滤列表中的值

[英]Filter values from a list using values in another list

I have example data in the image shown, that uses the formula:我在显示的图像中有示例数据,它使用以下公式:

=FILTER(B3:B13,(B3:B13<>"D")*(B3:B13<>"H")*(B3:B13<>"J"))

to filter AK such that D,H and J are removed from the returned list.过滤 AK,以便从返回的列表中删除 D、H 和 J。

Is there any way using a formula that instead of having to specify the letters I wish to be removed can omit the values listed in another column (A in this case)?有什么方法可以使用公式而不是指定我希望删除的字母可以省略另一列中列出的值(在这种情况下为 A)? Ideally the solution will be just a formula but VBA could work too if anyone knows a solution for this.理想情况下,解决方案只是一个公式,但如果有人知道解决方案,VBA 也可以工作。

在此处输入图像描述

Use ISERROR(MATCH()):使用 ISERROR(MATCH()):

=FILTER(B3:B13,ISERROR(MATCH(B3:B13,A:A,0)))

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM