跳到主要内容

如何在Excel中vlookup并返回匹配值的整个/整个行?

通常,您可以使用Vlookup函数进行vlookup并从一系列数据中返回匹配值,但是,您曾经尝试过根据特定条件查找并返回整行数据,如下面的屏幕快照所示。

Vlookup并使用公式返回匹配值的整个/整个行数据

Vlookup并使用数组公式返回匹配值的全部/全部行数据


Vlookup并使用公式返回匹配值的整个/整个行数据

要获得匹配值的整个行数据,请应用以下公式:

输入以下公式: = VLOOKUP($ F $ 2,$ A $ 1:$ D $ 12,COLUMN(A1),FALSE) 放入要获取结果的空白单元格(例如H1),然后将公式向右拖动(从H2到K2),您将获得所需的整个行数据。 看截图:

备注:在以上公式中, F2 是您要基于其返回整行的查找值, A1:D12 是您要使用的数据范围, A1 表示数据范围内的第一列号。


Vlookup并使用数组公式返回匹配值的全部/全部行数据

除了以上公式,这里还有另一个数组公式也可以为您提供帮助。

1。 请选择要输出整个行结果的单元格,然后输入以下数组公式: = VLOOKUP(F2,$ A $ 2:$ D $ 12,{1,2,3,4},FALSE) 进入公式栏,请参见屏幕截图:

2。 然后按 Ctrl + Shift + Enter 键,您将获得匹配值的整行,请参见屏幕截图:

备注:在以上公式中, F2 是您要基于其返回整行的查找值, A2:D12 是您要使用的数据范围, 1,2,3,4 是要返回其对应值的列号。


如果您对Excel中的VLOOKUP函数感兴趣, Kutools for Excel's 超级查找 支持一些强大的Vlookup公式, 您可以 快速执行Vlookup函数,而无需记住任何公式。 点击下载Kutools for Excel!

Kutools for Excel:具有300多个方便的Excel加载项,可以在30天内免费试用,没有任何限制。 立即下载并免费试用!

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (27)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Vlookup kullandığımda değeri değil n/a şeklinde döndürüyor. rakamın kendisi yazmasini nasıl yapa bilirim ya da neden n/a döndürüyor
This comment was minimized by the moderator on the site
Is it possible to use Index/match formula to do the same thing? And if so, how?
This comment was minimized by the moderator on the site
Hello, Lin,
To solve this task with Index/match formula, please apply the below formula:
=INDEX(B2:E6,MATCH(G2,A2:A6,0),0)

After inserting the formula, please press Ctrl + Shift + Enter keys together, and then drag the fill handle to right to fill the results, see screenshot:
https://www.extendoffice.com/images/stories/comments/comment-skyyang/doc-lookup-entire-row.png

Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Excellent work.  I was wondering how to take this a step further and return rows that don't exactly match my criteria.  For example, I have:          a                    b                    c                    d1    2020-23          Jan                 17                  Complete2    2020-24          Jan                 17                  Complete3    2020-24a        Feb                 01                  
This comment was minimized by the moderator on the site
Is there a way to use the third column data to search in and still return the first two columns?
This comment was minimized by the moderator on the site
to get the 4 column to paste first copy the formula and select four cells and paste the formula you will get all 4
This comment was minimized by the moderator on the site
Also, I am unable to set up an account (tried twice and got an error twice) and cannot post a screenshot as a guest.
This comment was minimized by the moderator on the site
I've tried to replicate this table just as you had it but the formula does not work, what gives?
This comment was minimized by the moderator on the site
Hi,

I registered just to say thank you so much! After looking on the internet for hours this is exactly what I needed to see. Perfect explanation.

Thanks,

Jack
This comment was minimized by the moderator on the site
So I am needing some help with Vlookup. Have a table with the following headers (group assignmen, Name, home town, gender, and comments). I am trying to input a value of the group and have it list everyone that is in the group along with the respective data such as the name, home town, gender, and comments associated with row. I am able to produce the first row but I need all the "1", "2",......."15" from the list that is sorted by group assignment not just the fist one from the list. Any help would be much appreciated
This comment was minimized by the moderator on the site
Is there a way to do a vlookup to return entire rows for one lookup value. If there were 4 rows with products titled DDD-4, can you do a search that will display the 4 products and the details in column 1,2,3,4?
This comment was minimized by the moderator on the site
Hello, Claude,
Maybe the below array formula can help you:(Note: after pasting this formula, please press Ctrl + Shift + Enter keys together.)
=IFERROR(INDEX(A:A,SMALL(IF(ISNUMBER(SEARCH($E$2,$A$2:$A$12)),ROW($A$2:$A$12),""),ROW()-1)),"")
After pressing the Ctrl + Shift + Enter keys, then drag the fill handle right to the cells, and then drag the fill hanlde down the cells to get the results.
Please try, hopt it can help you, thank you!
This comment was minimized by the moderator on the site
Is there a way to do this but search across multiple sheets?
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations