Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 76
Default find location of maximum and get the category type

I know this is really easy in Access, but unfortunately I have to work on
Excel...

I need to do a query that will search for the maximum value and give me the
type. Here's the example:

A B
1 Categories Results
2 Type 1 10
4 Type 2 30
5 Type 3 20


In this case, the maximum value for this array is 30. I want my query to
find the 30 and give me "Type 2" as the result.

I hope that this can be done with built-in formulas, rather than adding a
v-basic macro... Thank you!

Pablo
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default find location of maximum and get the category type

If you can swap those columns, then you could do a VLOOKUP

=VLOOKUP(MAX(A:A),A:B,2,FALSE)

would get it.



"Pablo" wrote:

I know this is really easy in Access, but unfortunately I have to work on
Excel...

I need to do a query that will search for the maximum value and give me the
type. Here's the example:

A B
1 Categories Results
2 Type 1 10
4 Type 2 30
5 Type 3 20


In this case, the maximum value for this array is 30. I want my query to
find the 30 and give me "Type 2" as the result.

I hope that this can be done with built-in formulas, rather than adding a
v-basic macro... Thank you!

Pablo

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default find location of maximum and get the category type

I think this should work...

=INDEX(A:A,MATCH(MAX(B:B),B:B,0))

--
Rick (MVP - Excel)


"Pablo" wrote in message
...
I know this is really easy in Access, but unfortunately I have to work on
Excel...

I need to do a query that will search for the maximum value and give me
the
type. Here's the example:

A B
1 Categories Results
2 Type 1 10
4 Type 2 30
5 Type 3 20


In this case, the maximum value for this array is 30. I want my query to
find the 30 and give me "Type 2" as the result.

I hope that this can be done with built-in formulas, rather than adding a
v-basic macro... Thank you!

Pablo


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default find location of maximum and get the category type

Try this:

=INDEX(A2:A4,MATCH(MAX(B2:B4),B2:B4,0))

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Pablo" wrote in message
...
I know this is really easy in Access, but unfortunately I have to work on
Excel...

I need to do a query that will search for the maximum value and give me
the
type. Here's the example:

A B
1 Categories Results
2 Type 1 10
4 Type 2 30
5 Type 3 20


In this case, the maximum value for this array is 30. I want my query to
find the 30 and give me "Type 2" as the result.

I hope that this can be done with built-in formulas, rather than adding a
v-basic macro... Thank you!

Pablo



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default find location of maximum and get the category type

Hi,

Here is a minor simplificatins

=INDEX(A2:A4,MATCH(MAX(B2:B4),B2:B4))

and if you range named A2:A4 A and B2:B4 B

=INDEX(A,MATCH(MAX(B),B,0))

--
Thanks,
Shane Devenshire


"Pablo" wrote:

I know this is really easy in Access, but unfortunately I have to work on
Excel...

I need to do a query that will search for the maximum value and give me the
type. Here's the example:

A B
1 Categories Results
2 Type 1 10
4 Type 2 30
5 Type 3 20


In this case, the maximum value for this array is 30. I want my query to
find the 30 and give me "Type 2" as the result.

I hope that this can be done with built-in formulas, rather than adding a
v-basic macro... Thank you!

Pablo



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
How to colntrol location of category X axis labels on a bar chart? Naum Charts and Charting in Excel 4 December 12th 07 08:44 PM
i can not find user definded on the function category [email protected] uk Excel Discussion (Misc queries) 1 November 17th 06 05:36 PM
Finding Location of Maximum Value in 2D Array [email protected] Excel Discussion (Misc queries) 17 November 10th 06 02:36 PM
Finding Location of Maximum Value in 2D Array [email protected] New Users to Excel 15 November 9th 06 05:23 AM
Finding Location of Maximum Value in 2D Array [email protected] Excel Worksheet Functions 15 November 9th 06 05:23 AM


All times are GMT +1. The time now is 03:31 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"