Salt la conținutul principal

 Cum se găsește cea mai mare valoare într-un rând și se returnează antetul coloanei în Excel?

În acest articol, voi vorbi despre cum se returnează antetul coloanei cu cea mai mare valoare într-un rând în Excel. De exemplu, am următorul interval de date, coloana A este anul, iar coloana B până la F sunt completate cu numerele de ordine din ianuarie până în mai. Și acum, vreau să obțin numele lunii cu cea mai mare valoare din fiecare rând.

doc-get-column-header-1

Găsiți cea mai mare valoare într-un rând și întoarceți antetul coloanei cu formula


săgeată albastru dreapta balon Găsiți cea mai mare valoare într-un rând și întoarceți antetul coloanei cu formula

Pentru a prelua antetul coloanei cu cea mai mare valoare într-un rând, puteți aplica o combinație de funcții INDEX, MATCH și MAX pentru a obține rezultatul. Vă rugăm să faceți următoarele:

1. Introduceți această formulă într-o celulă goală de care aveți nevoie: =INDEX($B$1:$F$1,0,MATCH(MAX($B2:$F2),$B2:$F2,0)), apoi apăsați Intrați tasta pentru a obține numele lunii care se potrivește cu cea mai mare valoare dintr-un rând. Vedeți captura de ecran:

doc-get-column-header-2

2. Și apoi selectați celula și trageți mânerul de umplere peste intervalul pe care doriți să conțineți această formulă, consultați captura de ecran:

doc-get-column-header-3

notițe: În formula de mai sus: B1: F1 este rândul antetelor pe care doriți să îl returnați, B2: F2 este intervalul de date care conține cea mai mare valoare pe care doriți să o găsiți.


Articol asociat:

Cum se găsește cea mai mare valoare și se returnează valoarea celulei adiacente în Excel?

Cele mai bune instrumente de productivitate de birou

🤖 Kutools AI Aide: Revoluționați analiza datelor pe baza: Execuție inteligentă   |  Generați codul  |  Creați formule personalizate  |  Analizați datele și generați diagrame  |  Invocați funcțiile Kutools...
Caracteristici populare: Găsiți, evidențiați sau identificați duplicatele   |  Ștergeți rândurile goale   |  Combinați coloane sau celule fără a pierde date   |   Rundă fără Formula ...
Super căutare: VLookup cu mai multe criterii    VLookup cu valori multiple  |   VLookup pe mai multe foi   |   Căutare fuzzy ....
Listă derulantă avansată: Creați rapid o listă derulantă   |  Listă drop-down dependentă   |  Listă derulantă cu selectare multiplă ....
Manager de coloane: Adăugați un număr specific de coloane  |  Mutați coloanele  |  Comutați starea vizibilității coloanelor ascunse  |  Comparați intervale și coloane ...
Caracteristici prezentate: Focus pe grilă   |  Vedere de proiectare   |   Big Formula Bar    Manager registru de lucru și foi   |  Biblioteca de resurse (Text automat)   |  Data Picker   |  Combinați foi de lucru   |  Criptare/Decriptare celule    Trimiteți e-mailuri după listă   |  Super Filtru   |   Filtru special (filtrează bold/italic/barat...) ...
Top 15 seturi de instrumente12 Text Instrumente (Adăuga text, Eliminați caractere,...)   |   50+ Diagramă Tipuri de (Gantt Chart,...)   |   40+ Practic Formule (Calculați vârsta pe baza zilei de naștere,...)   |   19 inserare Instrumente (Introduceți codul QR, Inserați imaginea din cale,...)   |   12 Convertire Instrumente (Numere la cuvinte, conversie valutara,...)   |   7 Merge & Split Instrumente (Rânduri combinate avansate, Celule divizate,...)   |   ... și altele

Îmbunătățiți-vă abilitățile Excel cu Kutools pentru Excel și experimentați eficiența ca niciodată. Kutools pentru Excel oferă peste 300 de funcții avansate pentru a crește productivitatea și a economisi timp.  Faceți clic aici pentru a obține funcția de care aveți cea mai mare nevoie...

Descriere


Fila Office aduce interfața cu file în Office și vă face munca mult mai ușoară

  • Activați editarea și citirea cu file în Word, Excel, PowerPoint, Publisher, Access, Visio și Project.
  • Deschideți și creați mai multe documente în filele noi ale aceleiași ferestre, mai degrabă decât în ​​ferestrele noi.
  • Vă crește productivitatea cu 50% și reduce sute de clicuri de mouse pentru dvs. în fiecare zi!
Comments (26)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Can you do this with a MAXIFS function?
This comment was minimized by the moderator on the site
Hello, Ted,
In this case, here can't use the MAXIFS function. In Excel, the MAXIFS function is used to return the largest number in a column based on one or more criteria.
Please click to know more about this MAXIFS fucntion..., it explains this function clearly and detailedly.
Thank you!
This comment was minimized by the moderator on the site
What if there are 2 same highest value, how can i return both column headers, for example the sales for both april and august are 30k, how can i return the name of both april and august
This comment was minimized by the moderator on the site
Hello, To return all the column headers with multiple higest values, you should apply the below User Defined Function.
Function getmax(rngRst As Range, rngVal As Range) As String
Dim i As Integer
Dim xNum As Double
Dim xStr As String
xNum = Application.WorksheetFunction.Max(rngVal)
For i = 1 To rngVal.Count
If rngVal(i).Value = xNum Then
xStr = xStr & rngRst(i).Value & ","
End If
Next
getmax = Left(xStr, Len(xStr) - 1)
End Function

Please copy the above code into the VBA module, and then use the below formula to get the first result, and then drag the fill handle down to return other column headers.=getmax($B$1:$H$1,B2:H2)

Please try, hope it can help you!
This comment was minimized by the moderator on the site
Hi, I have attendance sheet. First column heading is names and rest columns for dates.
Names columns shows names in rows and dates columns shows p (present) H (weekoff) L (leave)
It's for 23 people.
and at last I have made total presents in a day, then total leaves and then total weekoffs.
"Now I am searching the way where I can click on total present numbers and get list of all names who are present in a particular day."
I tried many ways but no luck.
first columns names, second shows if they were present or leave or on week offs.Is there anyway where I can get list of all names who are present or on leave?Any formula?
This comment was minimized by the moderator on the site
how can i modify this logic to show me all the records in one row where a value in all selected columns are greater than 1
This comment was minimized by the moderator on the site
how can i modify this logic to show all the column header in a single row where the value is > 1?
This comment was minimized by the moderator on the site
Did you figure this out
This comment was minimized by the moderator on the site
yoh you are so late man .  year has passed XD
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
hi. having same issue. Pls do reply if u have found the way out.
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
Thank you so much!!!
This comment was minimized by the moderator on the site
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
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