跳到主要內容

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

如左圖所示,您需要在表中查找並列出值“ Linda”的所有匹配實例。 如何實現呢? 請嘗試本文中的方法。

列出具有數組公式的值的所有匹配實例
使用Kutools for Excel輕鬆列出值的第一個匹配實例

有關VLOOKUP的更多教程...


列出具有數組公式的值的所有匹配實例

使用以下數組公式,您可以輕鬆地在Excel的某個表中列出該值的所有匹配實例。 請執行以下操作。

1.選擇一個空白單元格以輸出第一個匹配的實例,在其中輸入以下公式,然後按 按Ctrl + 轉移 + Enter 鍵同時。 

=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輕鬆列出值的第一個匹配實例

您可以輕鬆找到並列出值的第一個匹配實例。 在列表中查找值 功能 Excel的Kutools 不記得公式。 請執行以下操作。

申請前 Excel的Kutools首先下載並安裝.

1.選擇一個空白單元格,您將放置第一個匹配的實例,然後單擊 庫工具 > 公式助手 > 公式助手

2。 在裡面 公式助手 對話框,您需要:

2.1查找並選擇 在列表中查找值 在選項 選擇一個公式 框;
保養竅門:您可以檢查 篩選 框,在文本框中輸入關鍵字以快速過濾所需的公式。
2.2在 表格數組 框,選擇包含特定值列和匹配實例列的表範圍;
2.3在 外觀值 框,選擇具有特定值的單元格,您將基於該單元格列出第一個實例;
2.4在 框,選擇包含匹配實例的列。 或者只是在其中輸入列號;
保養竅門:列號基於所選的列數,如果您選擇四列,而這是第三列,則需要在列號中輸入數字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選項卡為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