跳到主要內容

如何在Excel中找到最大值並返回相鄰的單元格值?

doc-get-最大相關值-1 1

如果您具有如下面的屏幕快照所示的一系列數據,現在,您想要在A列中找到最大值,並在B列中獲得其相鄰的單元格內容。在Excel中,可以使用一些公式來解決此問題。

查找最大值並使用公式返回相鄰的單元格值

使用Kutools for Excel查找並選擇最大值並返回相鄰的單元格值


箭頭藍色右氣泡 查找最大值並使用公式返回相鄰的單元格值

以上面的數據為例,要獲取其對應數據的最大值,可以使用以下公式:

請輸入以下公式: = VLOOKUP(MAX($ A $ 2:$ A $ 11),$ A $ 2:$ B $ 11,2,FALSE) 放入所需的空白單元格,然後按 Enter 返回正確結果的鍵,請參見屏幕截圖:

doc-get-最大相關值-2 2

筆記:

1.在上式中 A2:A11 是您想知道最大值的數據范圍,並且 A2:B11 表示您使用的數據范圍,數字 2 是返回匹配值的列號。

2.如果A列中有多個最大值,則此公式僅獲得第一個對應的值。

3.使用上面的值,您只可以從右列返回單元格值,如果需要返回左列中的值,則應應用以下公式: =INDEX(A2:A11,MATCH(MAX(B2:B11),B2:B11,0))( A2:A11 是您想要獲得相對值的數據范圍, B2:B11 是包含最大值的數據范圍),然後按 Enter 鍵。 您將得到以下結果:

doc-get-最大相關值-3 3


箭頭藍色右氣泡 使用Kutools for Excel查找並選擇最大值並返回相鄰的單元格值

上面的公式只能幫助您返回第一個對應的數據,如果有重複的最大數字,將無濟於事。 Excel的Kutools's 選擇具有最大值和最小值的單元格 實用程序可以幫助您選擇所有最大的數字,然後您可以輕鬆查看與最大數字相鄰的相應數據。

安裝後 Excel的Kutools,請執行以下操作:

Excel的Kutools : 帶有300多個便捷的Excel加載項,可以在30天內免費試用. 

1。 選擇要查找的數字列,然後選擇最大值。

2。 然後點擊 庫工具 > 選擇 > 選擇具有最大值和最小值的單元格,請參見屏幕截圖:

3。 在 選擇具有最大值和最小值的單元格 對話框中選擇 最大值 來自 轉到 部分,然後選擇 細胞 在選項 台面 部分,然後選擇 所有細胞 or 僅第一個單元格 您想要選擇最大的值,請單擊 OK,已選擇A列中最大的數字,然後可以獲得與它們相鄰的相應數據,請參見屏幕截圖:

doc-get-最大相關值-5 5 2 doc-get-最大相關值-6 6

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


相關文章:

如何在Excel中找到一行的最高值並返回列標題?

最佳辦公生產力工具

🤖 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 (13)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Using the formula avoce with "name" includes, I am trying to show the highest rated players for Male and Female.

Z = Player Names (text format)
AB = Players gender (text format)
T = Player Ratings (number format)
AE1 = Male (text format)
AF1 = Female (text format)

=INDEX($Z$2:$Z$220, MATCH(MAXIFS($T$2:$T$220, $AB$2:$AB$220, AE1, $AB$2:$AB$220, AE1), $T$2:$T$220, 0))

Above returns correct data of highest rated male player

=INDEX($Z$2:$Z$220, MATCH(MAXIFS($T$2:$T$220, $AB$2:$AB$220, AF1, $AB$2:$AB$220, AF1), $T$2:$T$220, 0))

Above returns incorrect data of highest rated female player. In fact, it returns a male players data. Can more than one index/match on a sheet cause issues? I've searched and edited the sheet more than I care. Any ideas?
This comment was minimized by the moderator on the site
How do I automate selecting a Row based on the largest number in a specific column based on another columns data of same date.I.E.   I have a Column A having an entire month of days.   Each specific day has up to 24 rows.   I have another column that represents a high water mark for every hr - 24 hrs in a day 28-31 days in a month.   I need an automated way to strip the highest high water mark of every single day within the month.     
This comment was minimized by the moderator on the site
This is brilliant and so easy to understand, thank you!

This comment was minimized by the moderator on the site
thank you very much, you saved me
This comment was minimized by the moderator on the site
Muchas gracias era justo lo que buscaba
This comment was minimized by the moderator on the site
I GET #NA what am I doing wrong? Thanks
This comment was minimized by the moderator on the site
Thank you very much for sharing, I was having real trouble with this function. Of course in hindsight, it's as clear as glass!

Thanks Again & Best Regards,

Jon
This comment was minimized by the moderator on the site
Hello,

I need your help. For this table:

A B C
2002 1 4 7
2003 2 5 8
2004 3 6 9


I want that excel returns the year with the highest value for each column. For example, for column A, I want a formula that returns "2004". Can you, please, help me?


Thanks!
This comment was minimized by the moderator on the site
any way we can find the minimum of the cells selected and return the value in the cell adjacent. kutools only allow for data range selection.
This comment was minimized by the moderator on the site
Hi, Viet,

As you said, the Kutools only can select the max or min values in selection.
To find the minimum value and return the data in adjacent cell, you just need to apply the following formula:
=INDEX(A2:A11,MATCH(MIN(B2:B11),B2:B11,0)).
Please try it, Thank you!
This comment was minimized by the moderator on the site
Like the 2 above me already asked, how can we get multiple values if there are multiple max ones? For example, you have 2 items in a list of 100 items that are both 92% and the rest is below that, how does one get both items with that percentage instead of just one?
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