跳到主要內容

如何在Excel中vlookup值並返回true或false / yes或no?

在許多情況下,您可能需要在一列中查找值,如果在另一列中是否找到該值,則只返回true或false(是或否)。 在本文中,我們將向您展示實現該目標的方法。

Vlookup並使用公式返回true或false / yes或no
如果使用出色的工具在另一列中找到值,則突出顯示一列中的值

有關VLOOKUP的更多教程...


Vlookup並使用公式返回true或false / yes或no

假設您具有範圍A2:A18中的數據列表,如以下屏幕截圖所示。 要根據D2:D18中的值搜索A2:A4中的值並顯示結果True或false / Yes或No,請執行以下操作。

1.選擇一個空白單元格以輸出結果。 在這裡,我選擇B2。

2.輸入以下公式,然後按 Enter 鍵。

=IF(ISNA(VLOOKUP(A2,$D$2:$D$4,1,FALSE)), "No", "Yes")

3.選擇結果單元格,然後拖動“填充手柄”以將公式應用於其他單元格(在這種情況下,我向下拖動“填充手柄”,直到達到B18)。 看截圖:

注意: 要返回True或False,請用“ True”和“ False”替換公式中的“是”和“否”:
=IF(ISNA(VLOOKUP(A2,$D$2:$D$4,1,FALSE)), "False", "True")


如果使用出色的工具在另一列中找到值,則突出顯示一列中的值

如果您想在其他列中找到值(例如,用背景色突出顯示),請在此列中突出顯示它們,強烈建議您 選擇相同和不同的單元格 的效用 Excel的Kutools。 使用此實用程序,您只需單擊即可輕鬆實現。 如下面的演示所示。 立即下載 Kutools for Excel! (30 天免費試用)

讓我們看看如果在另一列中找到值,如何應用此功能突出顯示一列中的值。

1.安裝Kutools for Excel後,單擊 庫工具 > 選擇 > 選擇相同和不同的單元格 啟用該實用程序。

2。 在裡面 選擇相同和不同的單元格 對話框,請進行以下配置。

  • 2.1)在 在中查找值 框中,選擇要突出顯示值的範圍;
  • 2.2)在 根據 框,選擇要突出顯示的值的範圍;
  • 2.3)在 基於 部分,檢查 單細胞 選項;
  • 2.4)在 發現 部分,選擇 相同的值 選項;
  • 2.5)在 結果處理 部分,檢查 填充背景色 or 填充字體顏色 根據需要指定突出顯示顏色;
  • 2.6)點擊 OK 按鈕。 看截圖:

然後,如果在C2:C18中找到範圍A2:A4中的值,它們將被突出顯示並立即選擇,如下面的屏幕截圖所示。

  如果您想免費試用(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 (8)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I have four criteria, Heated, RF enabled, Carbon Filters, 3 Storey.

i have created a table showing model numbers with corresponding YES & NO to the above criteria. 

i want to create a way to bring back a singular result when i choose relative YES & NO for each criteria.
Can this be done? 
This comment was minimized by the moderator on the site
Thanks so much, this worked perfectly for what I needed!
This comment was minimized by the moderator on the site
Hello there,
Kindly help me with function/command that will arrange same vaue in the two columns given below:
This comment was minimized by the moderator on the site
I need help using vlookup with if function for yes or no but this time the result we be as value not as Yes / NO or True or False, the oppsite of the above example.
This comment was minimized by the moderator on the site
Satir, late message but I just did the exact job that you are tasked with. Original Version =IF(ISNA(VLOOKUP(A2,$D$2:$D$185,1,FALSE)), "False", "True"). My Version: =IF(A2="","",(IF(ISNA(HLOOKUP(A2,'1. Round One'!$C$2:$Q$2,1,FALSE)),"",'1. Round One'!$H$5&" "&'1. Round One'!$H$6&" "&'1. Round One'!$H$7))) The difference is mine will return 3 values that are related to the value I just looked up.. aswell as it wont display anything unless the value was found.. to simply it for your use, ive provided one below. =IF(ISNA(VLOOKUP(A2,$D$2:$D$185,1,FALSE)), "B1", "B2"). (B1 AND B2 BEING THE CELLS WITH VALUES YOU WANT IT TO DISPLAY INSTEAD OF YES/NO)
This comment was minimized by the moderator on the site
I got the simpler one, use this ,, =IFERROR(VLOOKUP(A2,$D$2:$D$185,1,FALSE)),"Not available"
This comment was minimized by the moderator on the site
This formula worked for my situation. Thank you!
This comment was minimized by the moderator on the site
can i use Yes / NO in vlookup to return a result to number or value. all the exmple gives result of Yes / NO or True/ False i need oppsite to it.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations