跳到主要內容

如何在Excel中兩列之間查找唯一/重複值?

例如,我有兩列不同長度的學生姓名,現在,我想比較這兩列以選擇A列而不是B列的所有值,並選擇B列而不是A列的所有值。這意味著在兩列之間選擇唯一值。 如果我逐個單元地比較它們,那將非常耗時。 有什麼好主意可以快速找出Excel中兩列之間的所有唯一值?


使用公式查找兩列之間的唯一/重複值

以下公式也可以幫助您找到唯一值,請按照以下步驟操作:

在空白單元格B2中,輸入此公式 = IF(ISNA(VLOOKUP(A2,$ C $ 2:$ C $ 13,1,FALSE)),“是”,“”),然後將此單元格的“自動填充手柄”拖動到單元格B15。

如果唯一值僅保留在列A中,而不保留在列C中,則將顯示該唯一值 在B列中; 而如果在B列中什麼也不返回,則意味著相應的值保留在A列和C列中。請參見屏幕截圖:

筆記:

(1)在上式中 A2 是您要比較的列。 和 $ C $ 2:$ C $ 13 是您要與之比較的範圍。

(2)如果只想在C列而不是A列中列出唯一值,則可以應用以下公式: = IF(ISNA(VLOOKUP(C2,$ A $ 2:$ A $ 15,1,FALSE)),“是”,“”).

注意絲帶 公式太難記了嗎? 將公式另存為“自動文本”條目,以供日後再次使用!
閱讀全文...     免費試用

使用Kutools for Excel公式在兩列之間查找和計數唯一/重複值

實際上,Kutools for Excel也提供了類似的功能 計算單詞出現的次數 用於檢查和計算Excel中兩列之間的唯一值的公式。 請執行以下操作:

Excel的Kutools - 包含 300 多個 Excel 基本工具。 享受全功能 30 天免費試用,無需信用卡! 現在下載!

1。 在第一列旁邊選擇一個空白單元格,在本例中,我們選擇單元格B2,然後單擊 庫工具 > 公式助手 > 計算單詞出現的次數。 看截圖:

2。 在打開的“公式幫助器”對話框中,請指定第二列的絕對地址( $ C $ 2:$ C $ 13 就我們而言) 文本 框,選擇第一列的第一項(A2 就我們而言) Word 框中,然後單擊 OK 按鈕。

3。 然後將此單元格的“自動填充手柄”拖動到所需的範圍。

然後,將C列中每個項目的出現都計算在內。 0表示對應的項目在兩列之間是唯一的。 而其他數字(例如1)表示相應的值存在於列C中,並在列C中出現一次。請參見左屏幕截圖:

Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!


使用Kutools for Excel查找兩列之間的唯一/重複值

實際上,Kutools for Excel開發了一個 選擇相同和不同的單元格 實用程序,可幫助Excel用戶比較兩個列表,並輕鬆地查找/計算/突出顯示它們之間的相同值或唯一值。 請執行以下操作:

Excel的Kutools - 包含 300 多個 Excel 基本工具。 享受全功能 30 天免費試用,無需信用卡! 現在下載!

1。 點擊 庫工具 > 選擇>選擇相同和不同的單元格.

2。 在 選擇相同和不同的單元格 對話框,請執行以下操作:

(1)指定第一列,您將檢查其值是否唯一 在中尋找價值 框;
(2)在第二欄中指定要檢查的值 根據 框;
(3)在 基於 部分,請檢查 每一行 選項;
(4)在 發現 部分,請檢查 不同的價值觀 選項;
(5)可以選擇檢查 填充背景色 選項並從下拉列表下方指定填充顏色;
(6)點擊 Ok 按鈕。

備註(1) 如果兩列具有相同的標題,請檢查 我的數據有標題 選項; (2) 要找出兩列之間的重複值,請檢查 相同的價值 選項。

Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!

3。 然後選擇第一列中的所有唯一值(或重複值)並用指定的顏色填充,然後出現一個對話框,顯示已選擇了多少個單元格。 看截圖:
doc查找唯一值kte 02

如果要在C列中選擇值,而不是A列中的值,則只需要交換 範圍A範圍B.


演示:在Excel中查找兩列之間的唯一/重複值


Excel的Kutools:超過 300 個方便的工具觸手可及! 立即開始 30 天免費試用,沒有任何功能限制。 現在就下載!

最佳辦公生產力工具

🤖 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 (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
'=IF(ISNA(VLOOKUP(A2,$C$2:$C$13,1,FALSE)),"Yes","")'formula worked thanks buddy......................
This comment was minimized by the moderator on the site
Student ID Pass/Fail Result 2013000563 Passed 2013000563 Failed 2013000563 Passed 2013000563 Passed 2013000563 Passed Failed 2013000595 Passed 2013000595 Passed 2013000595 Passed 2013000595 Passed Passed please help me for same
This comment was minimized by the moderator on the site
In your first example Col A has more rows than Col C. If your reverse that, where Col C has more rows than A, then when you run out of rows in Col A, there will be yes's in the test column. How do you account for unequal rows in the formula? thanks very much....
This comment was minimized by the moderator on the site
Hi Sir, I have columns with different numbers and i need the unique numbers in the seperate column using formula is that possible? Regards Ashwin
This comment was minimized by the moderator on the site
Thanks a lot for the detailed answer.
This comment was minimized by the moderator on the site
I tried the two first ways but in both cases I got a message that the formula is faulty. Could the formula be different for excel on PC or mac? I would need an answer asap...
This comment was minimized by the moderator on the site
Hi there , I want to reconcile the ledger account in order to trace discrepencies using the easiest excel function. please help
This comment was minimized by the moderator on the site
I solved how we can find the differences between two spread sheets with nested formulas and an easy macro. I'm not a programmer. I'm an economist. Post this: http://youtu.be/T5H_w4x5tZg<br /> The template I designed is under copyright. Now I'm working with a different one when we are working with repeated records in both sheets. If anyone want to find any differences, send me your spread sheets if you like and I'll help you asap.
This comment was minimized by the moderator on the site
dear sir plz help me to tally ledger a/c of two excel sheet
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations