跳到主要内容

如何在Excel中列出值的所有匹配实例?

如左图所示,您需要在表中查找并列出值“ Linda”的所有匹配实例。 如何实现呢? 请尝试本文中的方法。

列出具有数组公式的值的所有匹配实例
使用 Kutools for Excel 轻松列出值的第一个匹配实例

有关VLOOKUP的更多教程...


列出具有数组公式的值的所有匹配实例

使用以下数组公式,您可以轻松地在Excel的某个表中列出该值的所有匹配实例。 请执行以下操作。

1.选择一个空白单元格以输出第一个匹配的实例,在其中输入以下公式,然后按 按Ctrl + 转移 + 输入 键同时。 

=INDEX($B$2:$B$11, SMALL(IF($D$2=$A$2:$A$11, ROW($A$2:$A$11)-ROW($A$2)+1), ROW(1:1)))

备注:在公式中,B2:B11是匹配的实例所位于的范围。A2:A11是该范围包含您将列出所有实例所基于的特定值。 并且D2包含一定值。

2.继续选择结果单元格,然后向下拖动“填充手柄”以获取其他匹配的实例。


使用 Kutools for Excel 轻松列出值的第一个匹配实例

您可以轻松找到并列出值的第一个匹配实例。 在列表中查找值 功能 Kutools for Excel 不记得公式。 请执行以下操作。

申请前 Kutools for Excel首先下载并安装.

1.选择一个空白单元格,您将放置第一个匹配的实例,然后单击 库工具 > 公式助手 > 公式助手

2.在 公式助手 对话框,您需要:

2.1查找并选择 在列表中查找值 在选项 选择一个公式 框;
Tips:您可以检查 筛选器 框,在文本框中输入关键字以快速过滤所需的公式。
2.2在 表格数组 框,选择包含特定值列和匹配实例列的表范围;
2.3在 外观值 框,选择具有特定值的单元格,您将基于该单元格列出第一个实例;
2.4在 框,选择包含匹配实例的列。 或者只是在其中输入列号;
Tips:列号基于所选的列数,如果您选择四列,而这是第三列,则需要在列号中输入数字3。 框。
2.5点击 OK 按钮。 

然后列出给定值的第一个匹配实例,如下图所示。

  如果您想免费试用(30天)此实用程序, 请点击下载,然后按照上述步骤进行操作。


相关文章

跨多个工作表的Vlookup值
您可以应用vlookup函数以返回工作表中的匹配值。 但是,如果您需要在多个工作表中使用vlookup值,该怎么办? 本文提供了详细的步骤来帮助您轻松解决问题。

Vlookup并在多列中返回匹配的值
通常,应用Vlookup函数只能从一列返回匹配的值。 有时,您可能需要根据条件从多个列中提取匹配的值。 这是您的解决方案。

Vlookup在一个单元格中返回多个值
通常,应用VLOOKUP函数时,如果存在多个符合条件的值,则只能获取第一个的结果。 如果要返回所有匹配的结果并将它们全部显示在一个单元格中,如何实现?

Vlookup并返回匹配值的整个行
通常,使用vlookup函数只能返回同一行中特定列的结果。 本文将向您展示如何根据特定条件返回整行数据。

向后Vlookup或反向
通常,VLOOKUP函数在数组表中从左到右搜索值,并且它要求查找值必须位于目标值的左侧。 但是,有时您可能知道目标值,并想找出相反的查找值。 因此,您需要在Excel中向后vlookup。 本文中有几种方法可以轻松解决此问题!

有关VLOOKUP的更多教程...

最佳办公生产力工具

🤖 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 (15)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Is there a way to make it totla up the values it find and just put it in the first box?
This comment was minimized by the moderator on the site
Hi Bramdon,

To total up all matched values, the following formula can help. Or you can take a look at this tutorial: vlookup and sum matches in rows or columns in Excel
=SUMPRODUCT((A2:A7=A10)*B2:F7)
https://www.extendoffice.com/images/stories/doc-excel/doc-vlookup-and-sum/doc-vlookup-sum-sumif4.png
This comment was minimized by the moderator on the site
Is there a way to stop this formula returning duplicate values

Thanks
Steven
This comment was minimized by the moderator on the site
Hi Steven Waddleton,
The following two formulas can do you a favor.
Array formula in E2:
=INDEX($B$2:$B$11,MATCH(0,COUNTIF($E$1:E1,$B$2:$B$11)+($A$2:$A$11<>$D$2),0)) + Ctrl + Shift + Enter
Formula in E2:
=LOOKUP(2, 1/((COUNTIF($F$1:F1,$B$2:$B$11)=0)*($D$2=$A$2:$A$11)), $B$2:$B$11)
In the formulas, E1 is the cell above the result cell.
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/instance-no-duplicates.png
This comment was minimized by the moderator on the site
WOW! Worked perfectly, thanks a ton! Awesome formula.
Rated 5 out of 5
This comment was minimized by the moderator on the site
Nice formula. In testing it I get #NUMBER! when I clear cells A9:B11. How to change the formula to prevent getting this error? I wonder, because I want to use this formula for a list of events on a certain date and on date 1 there are 40 events, on day 2 it are 10 events etc. I could create an indexed list for perhaps 100 rows, but it looks very strange when for date 2 the first 10 rows show events and the other 90 rows show #NUMBER!. It would be okay for me if it gave "-" as a result instead of #NUMBER!
This comment was minimized by the moderator on the site
Fantastic. Thank you so much. Very helpful for my work.
This comment was minimized by the moderator on the site
Amazing. The formula worked for me exactly the way I was looking for. Hats off. Thanks a ton
This comment was minimized by the moderator on the site
Question, I have a sheet laid out opposite of this where "Linda" would be the column header I would like to flag on and the value "90" or 89" I would like to return. Would I change the row function to a column function?
This comment was minimized by the moderator on the site
How would I use this formula but instead of filling down I could fill across but the formula would continue moving down as I fill across (ie. the formula changes from ROW(1:1) to ROW(2:2)
This comment was minimized by the moderator on the site
Hi Luke,The below array formula can do you a favor. Note: After entering the formula, please press the Ctrl + Shift + Enter key to apply it. And then drag its Fill Handle right across the cells you need. =INDEX($B$2:$B$11, SMALL(IF($D$2=$A$2:$A$11, ROW($A$2:$A$11)-ROW($A$2)+1), COLUMN(A1)))
This comment was minimized by the moderator on the site
A very useful and educational formula. I am matching against a set numeric value and it works a treat. How can I use >= rather than just = (i.e. IF($D$2>=$A$2:$A$11) to perform the match so it is looking for values greater than a set value (in $D$2). I assume as it doesn't work as one of the functions in the formula is matching against specific text rather than working with numbers?
This comment was minimized by the moderator on the site
This was super useful, thanks! I'm trying to take this one step further and be able to return all match instances of a certain value while having to search through more than a single-column array. To work through this using your example, I added a second column of test scores and modified your formula to look up a given test score and return the names that match that score. I got this to work with INDEX(SMALL()) and can pull all of the names from both test columns. I've also managed to return only names with that score on Test 2 using INDEX(MATCH(INDEX(MATCH))), however this can only find the first instance in the array. What I'm really trying to do is a combination of these: return all of the names with the given array, while narrowing the search to a specific column within the array. Do you have any tips for this?
This comment was minimized by the moderator on the site
Good day,
Would you please provide a screenshot of your spreadsheet showing what you are exactly trying to do? Thank you for your comment.
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