ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Reference to a column label (https://www.excelbanter.com/excel-discussion-misc-queries/73389-reference-column-label.html)

jhg1226

Reference to a column label
 
I have succesfully created a MAXA formula which retrieves the highest value
in a column of numbers. I would also like to have the label for that highest
number to appear as well. Can this be done?

Example:
Apples 4
Pears 6 MAXA returns the value 8 but I want the column heading
as well.
Oranges 8
Plums 3

Peo Sjoblom

Reference to a column label
 
=INDEX(A2:A6,MATCH(MAX(B2:B6),B2:B6,0))

where A2:A6 contain the headers

--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon




"jhg1226" wrote in message
...
I have succesfully created a MAXA formula which retrieves the highest value
in a column of numbers. I would also like to have the label for that
highest
number to appear as well. Can this be done?

Example:
Apples 4
Pears 6 MAXA returns the value 8 but I want the column heading
as well.
Oranges 8
Plums 3



patrickcairns

Reference to a column label
 

Perhaps something like this is the adjacent column

=LOOKUP(MAXA(B1:B10),B1:B10,A1:A10)


--
patrickcairns
------------------------------------------------------------------------
patrickcairns's Profile: http://www.excelforum.com/member.php...o&userid=31790
View this thread: http://www.excelforum.com/showthread...hreadid=515615


NAVEEN

Reference to a column label
 
Hi,

assuming your data starts from A1,

=INDIRECT(ADDRESS(MATCH(MAXA(B1:B4),B1:B4,0),COLUM N()-1))

else if it starts from row n

=INDIRECT(n+ADDRESS(MATCH(MAXA(B1:B4),B1:B4,0),COL UMN()-1))

"patrickcairns" wrote:


Perhaps something like this is the adjacent column

=LOOKUP(MAXA(B1:B10),B1:B10,A1:A10)


--
patrickcairns
------------------------------------------------------------------------
patrickcairns's Profile: http://www.excelforum.com/member.php...o&userid=31790
View this thread: http://www.excelforum.com/showthread...hreadid=515615




All times are GMT +1. The time now is 02:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com