Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 192
Default how do i get field name from result of MAX or LARGE function

This is probably easy one but I cant figure it out.
I want to get the field name/label from the same row in the column to the
left of the result of a MAX or LARGE function. Tried LOOKUP but data is not
in order.

e.g.

A B
ReasonA 23
ReasonB 44
ReasonC 17 I would like MAX function to return 'Reason B'
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,089
Default how do i get field name from result of MAX or LARGE function

=INDEX(A:A,MATCH(MAX(B:B),B1:B65534))

Regards

Trevor


"Nick" wrote in message
...
This is probably easy one but I cant figure it out.
I want to get the field name/label from the same row in the column to the
left of the result of a MAX or LARGE function. Tried LOOKUP but data is
not
in order.

e.g.

A B
ReasonA 23
ReasonB 44
ReasonC 17 I would like MAX function to return 'Reason B'



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default how do i get field name from result of MAX or LARGE function

Try this:

=INDEX(A1:A100,MATCH(MAX(B1:B100),B1:B100,0))

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"Nick" wrote in message
...
This is probably easy one but I cant figure it out.
I want to get the field name/label from the same row in the column to the
left of the result of a MAX or LARGE function. Tried LOOKUP but data is not
in order.

e.g.

A B
ReasonA 23
ReasonB 44
ReasonC 17 I would like MAX function to return 'Reason B'


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 192
Default how do i get field name from result of MAX or LARGE function

Thanks so much, it worked great. The ,0)) at the end makes all the
differance, but why?

"RagDyeR" wrote:

Try this:

=INDEX(A1:A100,MATCH(MAX(B1:B100),B1:B100,0))

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"Nick" wrote in message
...
This is probably easy one but I cant figure it out.
I want to get the field name/label from the same row in the column to the
left of the result of a MAX or LARGE function. Tried LOOKUP but data is not
in order.

e.g.

A B
ReasonA 23
ReasonB 44
ReasonC 17 I would like MAX function to return 'Reason B'



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default how do i get field name from result of MAX or LARGE function

The 0 at the end makes the Match() function look for exact matches *only*.
When looking for exact matches, the lookup data table does *not* have to be
sorted, and since yours (Column B) is not sorted, it returned the correct
value.
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------


"Nick" wrote in message
...
Thanks so much, it worked great. The ,0)) at the end makes all the
differance, but why?

"RagDyeR" wrote:

Try this:

=INDEX(A1:A100,MATCH(MAX(B1:B100),B1:B100,0))

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"Nick" wrote in message
...
This is probably easy one but I cant figure it out.
I want to get the field name/label from the same row in the column to

the
left of the result of a MAX or LARGE function. Tried LOOKUP but data is

not
in order.

e.g.

A B
ReasonA 23
ReasonB 44
ReasonC 17 I would like MAX function to return 'Reason B'






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number appear in text Just-n Excel Discussion (Misc queries) 5 December 14th 06 09:30 AM
Adding "and" to Spellnumber code Ken G. Excel Discussion (Misc queries) 10 July 22nd 06 12:53 PM
How to Convert Figures into Text in Excel m_azim1 Excel Worksheet Functions 3 April 5th 06 05:45 PM
VBA Monty Excel Worksheet Functions 2 January 30th 06 01:37 PM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM


All times are GMT +1. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"