excel vlookup多个结果

发布于 2025-01-25 02:02:51 字数 42 浏览 3 评论 0原文

如何使用Vlookup检索多个值,然后将所有这些值转换为彼此相邻的列?

How can I retrieve multiple values using vlookup and then transform all those values into columns next to each other?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

宫墨修音 2025-02-01 02:02:51

如果使用Office 365,则可以使用PGSYSTEMTESTER提供的解决方案:

= transpose(filter(b4:b9,a4:a9 = c2)))

其中c2包含搜索值,,,,
a4:a9包含以匹配搜索值的值,
b4:b9包含结果值。

如果使用O365之前的Excel版本,则可以通过:
= ifError(index($ b:$ b,骨料(15,6,行)($ a $ 4:$ a $ 9)/($ a $ 4:$ 4:$ a $ 9 = $ c $ 2),列(a:a:a )),“”)
此索引列B具有行号,其中搜索值c2a4:a9中找到了匹配。最小的行号匹配是索引的,当向右侧复制时,第二小时。

注意1:索引该功能的一部分使用整列参考。

注2:仅在列中函数的一部分,$在范围参考中省略了。这将导致更改向右复制时对右侧的范围引用。

If you use Office 365 you can use the solution provided by pgSystemTester:

=TRANSPOSE(FILTER(B4:B9,A4:A9=C2))

Where C2 contains the search value,
A4:A9 contains the values to match the search value,
B4:B9 contains the result values.

If an Excel version prior to O365 is used, this could be done by:
=IFERROR(INDEX($B:$B,AGGREGATE(15,6,ROW($A$4:$A$9)/($A$4:$A$9=$C$2),COLUMN(A:A))),"")
This indexes column B with the row numbers where a match is found on the search value C2 in A4:A9. The smallest row number matching is indexed and when copied to the right the 2nd smallest, etc.

Note 1: the INDEX part of the function uses whole column reference.

Note 2: Only in the COLUMN part of the function the $ is omitted in the range reference. This will result in changing the range reference to the right when copied to the right.

她如夕阳 2025-02-01 02:02:51

您可以将过滤器功能与换台结合在一起来完成所需的功能。

这是

You can use the filter function combined with transpose to accomplish what you want.

Here's a sample on google sheets, but it would also work on Excel provided you have Spill-Range functionality...

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文