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

or

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

在本文中,我將討論如何在Excel中返回一行中最大值的列標題。 例如,我有以下數據范圍,列A是年份,列B到F是從1月到5月填充訂單編號。 而現在,我想要得到每一行中最大值的月份名稱。

DOC-GET-列標題,1

在一行中查找最高值並使用公式返回列標題


在一系列單元格或每列或每行中選擇或突出顯示具有最大值和最小值的單元格:

DOC-GET-列標題,4

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


箭頭藍色右泡 在一行中查找最高值並使用公式返回列標題


要檢索一行中最大值的列標題,可以應用INDEX,MATCH和MAX函數的組合以獲得結果。 請做如下操作:

1. 將此公式輸入到您需要的空白單元格中: =INDEX($B$1:$F$1,0,MATCH(MAX($B2:$F2),$B2:$F2,0)),然後按 輸入 鍵來獲得與連續的最大值匹配的月份名稱。 看截圖:

DOC-GET-列標題,2

2。 然後選擇單元格並將填充手柄拖到要包含此公式的範圍,請參閱屏幕截圖:

DOC-GET-列標題,3

注意:在上面的公式中: B1:F1 是你想要返回的標題行, B2:F2 是包含您想要查找的最大值的數據范圍。


相關文章:

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


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.
    srosewall · 3 days ago
    Thank for this. It helped. Does it work the same way for a range of cells instead of just a row? I am trying to get the formula to return the column header (month) of the largest and smallest value in a range of cells? This is what I tried =INDEX($B$4:$M$4,0,MATCH(MAX($B5:$M42),$B5:$M42,0)) but it gives a #N/A answer
  • To post as a guest, your comment is unpublished.
    Fernando · 1 months ago
    What happens if you have duplicate values in a row and you want the latest value's header. Is this possible?
    The current formula only returns the first match, but in my case I need to know the latest one
  • To post as a guest, your comment is unpublished.
    Trickshot Films · 1 months ago
    You're Aces Kid !!! ... this example worked perfect for my application: =INDEX($B$1:$F$1,0,MATCH(MAX($B2:$F2),$B2:$F2,0))

    ISA 40:31
  • To post as a guest, your comment is unpublished.
    Janice Matthies · 1 years ago
    Thank you so much!!!
  • To post as a guest, your comment is unpublished.
    Kirthika · 2 years ago
    Hi, am trying to find lowest value in a row and the highest value on the corresponding column. Is there a formula or shortcut to find this. Please guide
  • To post as a guest, your comment is unpublished.
    Sean · 2 years ago
    Thank you! very helpful!
  • To post as a guest, your comment is unpublished.
    dave · 2 years ago
    pardon: think my message dissappeard (2nd copy?)
    hi, i am trying to find the column number of a max number in 1 row of 5 cells. if i start from M9 to Q9 and the max number is in the middle cell: O9 the result looking for would be: 3. i cannot change the header cells to have: 1 2 3 4 5 as they get values pasted over.. if this is the same formula as above. how to i modify it to use column locations instead of header values. thanks:

    =INDEX(M1:Q1,0,MATCH(MAX(M9:Q9),M9:Q9,0))
  • To post as a guest, your comment is unpublished.
    dave · 2 years ago
    hi, i am having trouble finding an "unquote" :) column number for where the maximun number is. if i use columns M9 thru Q9 and the max is in the middle column: O9, that is the 3rd column in that range. i cannot put 1 2 3 4 5 in the header cells as they get values pasted over. if this is the same formula as above, how do i modify it to get a result eg: 3 for 3rd column in. thanks.

    =INDEX(M1:Q1,0,MATCH(MAX(M9:Q9),M9:Q9,0))
  • To post as a guest, your comment is unpublished.
    Stephanie · 2 years ago
    Hi, i want to make a list with names and grades and i want to find the 3 highest grades and the names that go with them i used the formula =INDEX(A3:A13,MATCH(LARGE(K3:K13,2),K3:K13,0)) but if two people have the same grade what happens??? can someone help me????
  • To post as a guest, your comment is unpublished.
    Liz · 2 years ago
    How can I do this if I want to return a row header rather than column header? I would also like to base the row number on a value in another cell that matches the column header. (So, look up column header and max value in that column, return the row header for that max value).
  • To post as a guest, your comment is unpublished.
    THANK YOU · 2 years ago
    OMFG THIS ARTICLE JUST SAVED ME HOURS OF WORK TODAY

    THANK YOU SO MUCH FOR THIS SOLUTION. YOU ARE TRULY A GENIUS AND THIS METHOD IS MUCH APPRECIATED!!!!

    10/10
  • To post as a guest, your comment is unpublished.
    Joseph · 3 years ago
    Is it possible to have this function work with multiple tabs on the same spreadsheet?
  • To post as a guest, your comment is unpublished.
    MikeS · 3 years ago
    Great thank you, I'd have strugled creating that formula myself, kind of you to share.
    • To post as a guest, your comment is unpublished.
      Murtaza · 3 years ago
      Thanks. I would like to know how can this function work if there are multiple cells in a row with the same value ? Is it possible to return multiple column headers in the target cell ?