跳到主要內容

如何在Excel中使用多個條件vlookup值?

在 Excel 中,我們可以根據您使用 vlookup 功能設置的特定條件快速查找列表中的相應數據。 但是,如果您需要根據以下屏幕截圖所示的多個條件查找相對值,您將如何處理?

具有LOOKUP功能的具有多個條件的Vlookup值

具有INDEXT和MATCH函數的具有多個條件的Vlookup值

具有多個條件且具有有用功能的 Vlookup 值


假設我有以下數據范圍,我想使用兩個標準來返回相對值,例如,我知道產品和顏色需要在同一行返回其對應的銷售員:


具有LOOKUP功能的具有多個條件的Vlookup值

LOOKUP 函數可以幫助您解決這個問題,請將此公式輸入到指定的單元格中,然後按 Enter 以獲得正確結果的關鍵,請參見屏幕截圖:

=LOOKUP(2,1/($A$2:$A$12=G2)/($C$2:$C$12=H2),($E$2:$E$12))

備註:在以上公式中:

  • A2:A12 = G2:表示在A2:A2範圍內搜索G12的標準;
  • C2:C12=H2:表示在C2:C2範圍內搜索H12的條件;
  • E2:E12:指要返回相應值的範圍。

保養竅門:如果您有兩個以上的標準,您只需要將標準添加到公式中,如下所示: =LOOKUP(2,1/($A$2:$A$12=G2)/($B$2:$B$12=H2)/($C$2:$C$12=I2),($E$2:$E$12)).


具有INDEXT和MATCH函數的具有多個條件的Vlookup值

在Excel中,混合的INDEXT和MATCH函數功能強大,可以讓我們基於一個或多個條件來查找值,以了解此公式,請執行以下操作:

在空白單元格中輸入以下公式,然後按 Ctrl + Shift + Enter 鍵,然後您將獲得所需的相對值,請參見屏幕截圖:

=INDEX($E$2:$E$12,MATCH(1,($A$2:$A$12=G2)*($C$2:$C$12=H2),0))

備註:在以上公式中:

  • A2:A12 = G2:表示在A2:A2範圍內搜索G12的標準;
  • C2:C12=H2:表示在C2:C2範圍內搜索H12的條件;
  • E2:E12:指要返回相應值的範圍。

保養竅門:如果您有兩個以上的標準,您只需要將標準添加到公式中,如下所示: =INDEX($E$2:$E$12,MATCH(1,($A$2:$A$12=G2)*($B$2:$B$12=H2)*($C$2:$C$12=I2),0)).


具有多個條件且具有有用功能的 Vlookup 值

如果你有 Excel的Kutools,其 多條件查找 功能,您可以根據需要快速返回基於多個條件的匹配值。

注意:要應用此 多條件查找,首先,您應該下載 Excel的Kutools,然後快速輕鬆地應用該功能。

安裝後 Excel的Kutools,請這樣做:

1。 點擊 庫工具 > 超級查找 > 多條件查找,請參見屏幕截圖:

2。 在 多條件查找 對話框,請執行以下操作:

  • (1.)在 查詢值 部分,指定查找值範圍或按住 按Ctrl 您想根據其查找值的鍵;
  • (2.)在 輸出範圍 部分,選擇要放置匹配結果的輸出範圍;
  • (3.)在 關鍵列 部分,請按住 按Ctrl 鍵;
  • 備註: 中選擇的列數 關鍵列 字段必須等於在 查詢值 字段,以及每個選定列的順序 關鍵列 字段必須與中的條件列一一對應 查詢值 領域。
  • (4.)在 返回列 部分,選擇包含您需要的返回值的列。

3。 然後,點擊 OK or 登記 按鈕,所有基於多個條件的匹配值都被一次性提取出來,見截圖:


更多相關文章:

  • 跨多個工作表的Vlookup值
  • 在excel中,我們可以很容易地應用vlookup函數返回工作表的單個表格中的匹配值。 但是,您是否考慮過如何在多個工作表中查找值? 假設我有以下三個工作表的數據范圍,現在,我想根據這三個工作表的條件獲取部分相應值,如何在 Excel 中解決此工作?
  • Vlookup 在 Excel 中返​​回空白或特定值而不是 0 或 N/A
  • 通常,當您應用vlookup函數返回相應的值時,如果匹配的單元格為空,則將返回0,如果找不到匹配的值,則會顯示錯誤#N / A值,如下圖所示。 而不是顯示0或#N / A值,如何使其顯示空白單元格或其他特定的文本值?
  • Vlookup並返回兩個值之間的匹配數據
  • 在Excel中,我們可以應用常規的Vlookup函數根據給定的數據獲取相應的值。 但是,有時,我們想要vlookup並返回兩個值之間的匹配值,如下面的屏幕截圖所示,您如何在Excel中處理此任務?
  • Vlookup並返回匹配值的整個/整個行
  • 通常,您可以使用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 (11)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
2,1 itu fungsinya apa yah?
This comment was minimized by the moderator on the site
I have sheet where 2 values should be verify from table available in another file in which 2 values from sheet are common and after matching both the criteria e.g Size and type from table it should capture price
This comment was minimized by the moderator on the site
Hello excelmaster,
How are you? You can lookup values in another file. Let me show you two ways. 
Solution 1:
In photo 1,  sheet1 has the original data of the product details. In photo 2, we need to know the price of some items. We can use the help of the new Excel XLOOKUP function to do the trick.The syntax is =XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode]).Omitting the optional arguments, =XLOOKUP(lookup_value, lookup_array, return_array)In cell E2 of sheet2, please input the formula: =XLOOKUP(A2&B2&C2,Sheet1!A2:A12&Sheet1!B2:B12&Sheet1!C2:C12,Sheet1!D2:D12)Then you get the price of the item in E2. To get the rest of the result, we need to keep the arrays in E2 formula absolute.Then the formula becomes:=XLOOKUP(A2&B2&C2,Sheet1!$A$2:$A$12&Sheet1!$B$2:$B$12&Sheet1!$C$2:$C$12,Sheet1!$D$2:$D$12)
Then drag the autofill handle down to get the rest of the results.
Solution 2:Use the Multi-condition Lookup feature in Kutools for Excel. All results will be returned at the same time.Please see photo 3, set the values in Multi-condition Lookup dialog box. Click the OK button to get the results.Please see photo 4, results in sheet2 are returned based on the data in sheet1.
Hope my two solutions can help you. Have a nice day.
Sincerely,Mandy 
This comment was minimized by the moderator on the site
How do i do this
100 100100 ABC100101 DEF101102103 HIJ103
Results i want
100 ABC
100 ABC
100 ABC
100 ABC
101 DEF
101 DEF
102
103 HIJ
103 HIJ

what formula should i be using?
Thanks
This comment was minimized by the moderator on the site
The lookup will not work if there is a formula in the cell, what is the remedy ??
This comment was minimized by the moderator on the site
you are too genius, you solve my issue.
This comment was minimized by the moderator on the site
This is an elegant formula, also easily expansible to more criteria. The one donwside of INDEX+MATCH formulas is that it's really slow in larger datasets.
This comment was minimized by the moderator on the site
Index match should be faster in my personal opinion. It has been tested as well by many. If uses index match in an array, definitely it will be slower since it will become like a volatile formula. The above formula uses index match in array for multiple criteria condition which actually can be change to non-array type as well ;)
This comment was minimized by the moderator on the site
Thanks for this tutorial; :-) I have a question. What formula should I used? I have a series of data in a row like A1:M1, I'd like a result that if there is/are data that is/are < or > in specific number, it will result to "Disqualified" if it's true or " " (space) if false.
This comment was minimized by the moderator on the site
Hello, Thanks for this tutorial, it's very helpful. The following formula works great. =LOOKUP(2,1/(B:B=H97)/(I:I=H98),E:E). I have a simple question. What I want is, the cell should get the value if (H98 = open) If "open" is not there in (I:I) match (H99 = Under observation) from (I:I) and get the value, If possible get the row. I want to keep the formula as lite as possible. As I will be copying this formula in lots of cells. Also kindly suggest which of the above formula (LOOKUP/SUMPRODUCT/INDEX) is less processor intensive.
This comment was minimized by the moderator on the site
=LOOKUP(2,1/(A2:A10=G2)/(B2:B10=G3),(D2:D10)) what does the 2 mean?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations