提示:其他語言是Google翻譯的。 你可以訪問 English 版本。
登入
x
or
x
x
註冊
x

or

如何比較兩列並返回Excel中第三列的值?

doc比較兩個列表並返回第三個1

例如,我有以下兩列,列A是一些項目,列B是相應的名稱。 在這裡,我在D列中有一些隨機項目,現在我想根據列D中的項目返回列B中的對應名稱。如何比較兩列A和D並從列B返回相對值在Excel中?

比較兩列,並返回第三列的值與公式

比較兩列,並返回第三列Kutools for Excel的值


Vlookup並返回第三列中的匹配值:

Kutools for Excel 為Excel用戶收集多個有用的公式,通過使用它們,您可以快速解決很多難題,例如計算年齡,添加月,年,日,星期,查找以及從第三列返回的值等等。

doc比較兩個列表並返回第三個9

Kutools for Excel:比200方便的Excel加載項,可以在60天免費試用。 下載並免費試用現在!



以下公式可以幫助您比較兩列並從第三列中提取相應的值,請按照以下步驟操作:

1。 輸入以下兩個公式中的任何一個到除了比較列以外的空白單元格E2:

=IF(ISNA(MATCH(D2,$A$2:$A$16,0)),"",VLOOKUP(D2,$A$2:$B$16,2,FALSE))

= VLOOKUP(D2,$ A $ 2:$ B $ 16,2,FALSE)

2。 然後按 輸入 鍵獲取第一個相應的值,看截圖:

doc比較兩個列表並返回第三個2

3。 然後選擇單元格,然後將填充手柄向下拖動到要應用此公式的單元格,並且所有對應的值都立即返回。 看截圖:

doc比較兩個列表並返回第三個3

注意: 在上面的公式中: D2 是要返回基於的值的標准單元格, A2:A16 是包括要與之比較的標準的列, A2:B16 您要使用的數據范圍。


Kutools for Excel 在列表中尋找一個值 也可以幫助您從其他數據范圍返回相應的數據。

Kutools for Excel : 與超過300方便的Excel加載項,在60天免費試用沒有限制.

安裝後 Kutools for Excel請按照以下步驟進行:

1。 單擊您想要返回相關數據的空白單元格。

2。 然後點擊 Kutools > 公式 > 在列表中尋找一個值,看截圖:

doc比較兩個列表並返回第三個4

3。 在 配方助手 對話框,請執行以下操作:

(1。)單擊 doc比較兩個列表並返回第三個6 按鈕旁邊的按鈕 表格數組 選擇您想要查看的數據范圍,然後輸入 $ 字符到單元格的引用使相對引用成為絕對引用;

(2。)單擊 doc比較兩個列表並返回第三個6 按鈕旁邊的按鈕 Look_value 選擇您需要的標準值;

(3。)單擊 doc比較兩個列表並返回第三個6 按鈕旁邊的按鈕 選擇該列將會返回相應的值。

doc比較兩個列表並返回第三個5

4. 然後點擊 Ok 按鈕關閉對話框,並顯示了第一個相應的數據,請參閱截圖:

doc比較兩個列表並返回第三個7

5。 然後選擇第一個匹配的單元格,然後將填充手柄向下拖動到要應用此公式的單元格,並且所有相關值都立即返回,請參見屏幕截圖:

doc比較兩個列表並返回第三個8

立即下載並免費試用Kutools for Excel!


Kutools for Excel:比200方便的Excel加載項,可以在60天免費試用。 下載並免費試用現在!


Kutools for Excel解決了您的大多數問題,並使您的生產率提高了80%

  • 重用: 快速插入 複雜的公式,圖表 以及你以前用過的任何東西; 加密單元格 密碼; 創建郵件列表 並發送電子郵件...
  • 超級方程式酒吧 (輕鬆編輯多行文字和公式); 閱讀佈局 (輕鬆讀取和編輯大量單元格); 粘貼到過濾範圍...
  • 合併單元格/行/列 不丟失數據; 分裂細胞含量; 組合重複的行/列...防止重複的細胞; 比較範圍...
  • 選擇複製或唯一 行; 選擇空行 (所有細胞都是空的); 超級查找和模糊查找 在許多工作簿中; 隨機選擇......
  • 精確複製 多個單元格而不更改公式參考; 自動創建參考 多張表; 插入項目符號,複選框等等......
  • 提取文本,添加文本,按位置刪除, 刪除空間; 創建和打印分頁小計; 在單元格內容和註釋之間轉換...
  • 超級過濾器 (將過濾方案保存並應用到其他工作表); 高級排序 按月/週/日,頻率等; 特殊過濾器 用粗體,斜體......
  • 結合工作簿和工作表; 根據鍵列合併表; 將數據拆分為多個表格; 批量轉換xls,xlsx和PDF...
  • 超過300強大的功能。 支持Office / Excel 2007-2019和365。 支持所有語言。 在您的企業或組織中輕鬆部署。 全功能30天免費試用。
kte tab 201905

Office選項卡為Office提供選項卡式界面,使您的工作更輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,Publisher,Access,Visio和Project。
  • 在同一窗口的新選項卡中打開並創建多個文檔,而不是在新窗口中。
  • 通過50%提高您的工作效率,每天為您減少數百次鼠標點擊!
官方底部
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    pavan · 5 months ago
    what if i have repeated valued in d column i.e with same name Q!,Q2,Q3,Q4 now if i use your formula i get only Q1 value i need also the 2nd,3rd,4th,matches also
  • To post as a guest, your comment is unpublished.
    Jason McArthur · 6 months ago
    I want to compare 2 columns data on one sheet to a range on another sheet and return the data in the 3rd column from the 2nd sheet
  • To post as a guest, your comment is unpublished.
    A · 7 months ago
    I have 3 columns, A B C, i'd like to get the value of A where the value in Column C matches the value in column B is that possible?
    • To post as a guest, your comment is unpublished.
      skyyang · 7 months ago
      Hi, .
      Could you explain your problem more detailed, or you can insert a screenshot here?
      Thank you!
      • To post as a guest, your comment is unpublished.
        Shaikh Wasim · 5 months ago
        i'm facing the same issue,can u provide any formula for this type of calculation,i want result in another column.
        • To post as a guest, your comment is unpublished.
          skyyang · 5 months ago
          Hi, guys,
          Could you give your problem more detailed, or, you can insert a screenshot here?
      • To post as a guest, your comment is unpublished.
        Sk Wasim · 5 months ago
        Can u help me plz, i'm facing the same issue?
  • To post as a guest, your comment is unpublished.
    Andrea · 1 years ago
    I am struggling with this and just get blanks returning.

    Want to say if cell Shhet1!ED1 matches a cell in column Sheet2!C:C then provide data for adjacent cell in Sheet2!A:A
  • To post as a guest, your comment is unpublished.
    Tamara Leigh · 1 years ago
    Please could you assist me, I need to do an excel formula for a petty cash spreadsheet where it looks for an account number input in Col_C which must be looked for in a list of account numbers in Col_L and if FALSE needs to return the value input in COL_F

    Exampled below
  • To post as a guest, your comment is unpublished.
    Hamid · 1 years ago
    I have 3 excel columns which have values like this,
    Col_A Col_B Col_C
    ----- ----- -----
    400 600
    500 800
    400 300
    300 200
    700 900
    800 700
    500 100
    I want the values to be copied in Column C from Column B, which are not Mache with Column A values.
    I mean just copy the values from Column B, which are not available in Column A.
    Like below
    Col_C
    -----
    600
    200
    100
    Is there any excel formula using which I can achieve this?
  • To post as a guest, your comment is unpublished.
    Hailey · 1 years ago
    I have a master list of film titles in a certain order that must stay in that order. I duplicate that list onto another spreadsheet in order to be able to manipulate it and it gets out of order because I need to group it according to what has been completed or not. On that duplicate list, I add ID numbers in the column next to the titles. After I have completed everything I need to do, I must add those ID numbers to the master list while keeping the title order on that master list. How can I match those IDs to the list without having to manually add them in the correct order?
    • To post as a guest, your comment is unpublished.
      skyyang · 1 years ago
      Hello, Hailey,

      May be the following formula may help you:

      =VLOOKUP(A2,new!$A$2:$B$13,2,FALSE)

      in the above formula, new is your duplicate sheet name, please replace it to your own.

      Please try it, hope it can help you!
  • To post as a guest, your comment is unpublished.
    Andreas · 1 years ago
    Hello Sir, and thanks for the formulas provided. Although I used the formula as should it gives me N/A, which as I can understand is because is not matching the criteria between Columns D and A as per your example. Now so you can have better understanding, in my workbook A2 is the criteria cell that you want to return the value based on, G1:G15359 is the column including the criteria to be compared with, A1:N15359 the data range that you want to use.

    The formula is: =IF(ISNA(MATCH(Sheet2!A2,Sheet3!$G$1:$G$15359,0)),"",VLOOKUP(Sheet2!A2,Sheet3!$A$1:$N$15359,7,FALSE))


    As you have noticed I am using data from two different sheets, although I don't think that this is where the real issue is, since when clicking on the NA error it indicates the Sheet2 A2 cell and the error given is: The cell currently being evaluated contains a constant. (I have checked and confirmed that the formats are set on general). Not sure if it's because the information text are emails or because in some cells there's nothing.


    Will be looking forward for your response.
    • To post as a guest, your comment is unpublished.
      skyyang · 1 years ago
      Hello, Andresa,

      I tried your formula and it works well in my excel workbook. Can you give an attachment or a screenshot, so that i can understand well.

      Thank you!
  • To post as a guest, your comment is unpublished.
    Jinojith Nair · 1 years ago
    I need to do a comparison and pull put data as below -

    Sheet 1 contain Column A & B, B is blank. Sheet 2 contains Column C & D.


    The entire Column C items in Sheet 2 to be compared with first row item in Column A and if any corresponding values/data are there in Column A, then Column B to be populated with data corresponding to the row item in Column D.

    Column C will have a single word. Column D may or may not have data in it. Column A will have more text.
    • To post as a guest, your comment is unpublished.
      skyyang · 1 years ago
      Hello,
      Could you give a detailed example for your problem?
      You can insert a screenshot or attachment.
      Thank you!
  • To post as a guest, your comment is unpublished.
    Ardi · 1 years ago
    I used this formula and it mostly worked but the data from the other sheet does not come on the same row to match the reference Criteria cell.


    Here's my formula. can you have a look at it and see if there's anything wrong

    =IF(ISNA(MATCH(DPU!C2,$A$2:$A$100,0)),"",VLOOKUP(DPU!C2,DPU!C2:AP100,2,FALSE))
    • To post as a guest, your comment is unpublished.
      skyyang · 1 years ago
      Hello, Ardi,
      If you want to vlookup from another worksheet, you should apply the following formula:
      =IF(ISNA(MATCH(A2,Sheet1!$A$2:$A$10,0)),"",VLOOKUP(A2,Sheet1!$A$2:$B$10,2,FALSE))

      Note: Sheet1 is the sheet contains the original data that you want to vlookup, and you should chaneg the cell references to your need.

      Please try it! Thank you!
  • To post as a guest, your comment is unpublished.
    Rahat Bappy · 2 years ago
    Great brother! My first formula is working. But 2nd formula not working. I tried many times. But i can't...
  • To post as a guest, your comment is unpublished.
    onika · 2 years ago
    wow, so great! good sharing thank you! it was so useful for me.
  • To post as a guest, your comment is unpublished.
    Kelly Okere · 2 years ago
    You just saved me months of stressful entries with this post. I'm so grateful!

    Thanks.
  • To post as a guest, your comment is unpublished.
    Dhaya · 2 years ago
    Thank you some much it was very useful. Need add info, what if we have duplicate value in Col B, how to return the value for that too.
  • To post as a guest, your comment is unpublished.
    VIJAY · 3 years ago
    GOOD KNOWLEDGE SHARING THANK YOU VERY MUCH