简体   繁体   English

如何使用谷歌表格中的查询显示与多个值匹配的值

[英]How to shows values that matched with multiples values using query in google sheets

So apparently I try to list some IP from buyer side that matched with some parameters based by current table:所以显然我尝试从买方方面列出一些 IP 与当前表的一些参数相匹配:

The table桌子

I like to lists all of IP's that have been used together by seller and buyer similar like this我喜欢列出所有类似这样的卖家和买家一起使用的IP

Desirable Result理想的结果

Is there any query function in google sheets can solved this problem?谷歌表格中是否有任何查询 function 可以解决这个问题? since index match function only returns one IP value that matched first if there are 2 matched pairs.由于索引匹配 function 仅返回一个 IP 值,如果有 2 个匹配对,则该值首先匹配。 Thank you谢谢

You can first get a data base as follows (in F2)可以先得到一个数据库如下(在F2中)

=sort(split(arrayformula({ A2:A7 &"|seller|" & B2:B7 ; C2:C7 &"|buyer|" & D2:D7}),"|"))

then get unique values in J2然后在 J2 中获取唯一值

=unique({A2:A7;C2:C7})

and finally search all datas corresponding to unique values最后搜索唯一值对应的所有数据

=iferror(join(char(10),,query({$F:$H},"select Col3 where Col2='"& K$1 &"' and Col1='"& $J2 &"' ")))

you have to duplicate that formula你必须复制那个公式

在此处输入图像描述

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

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