Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Finding max value in column A where value in B =

Anyone knows how to find the max value in one column where the value
in another column match a particular search criteria. The sheet looks
something like this:

A B
Peter 5
James 3
Peter 7
James 6
Peter 2

I need to find the row with the highest number for Peter. Finding the
row (row 3) would be the best, but finding the number (7) could also
do because the numbers are almost certainly unique.

Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 698
Default Finding max value in column A where value in B =

With
A1:B5 containing your posted list....
Peter 5
James 3
Peter 7
James 6
Peter 2

AND...
C1: (a name from the list....eg. Peter)

Try this regular formula:
D1: =MAX(INDEX((A1:A5=C1)*(B1:B5),0))
Note: that formula only works if the max value for the name is NOT negative.

or this ARRAY FORMULA (commited with ctrl+shift+enter)
D1: =MAX(IF(A1:A5=C1,B1:B5))

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

Anyone knows how to find the max value in one column where the value
in another column match a particular search criteria. The sheet looks
something like this:

A B
Peter 5
James 3
Peter 7
James 6
Peter 2

I need to find the row with the highest number for Peter. Finding the
row (row 3) would be the best, but finding the number (7) could also
do because the numbers are almost certainly unique.

Thanks in advance.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Finding max value in column A where value in B =

Super Thanks Ron - the first formula does exactly what I was looking
for ;-)

Regards,
Martin

  #4   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Finding max value in column A where value in B =

A slight variation of Rons and Elkars suggestions to get the row number

=MATCH(MAX(IF(A1:A5=C1,B1:B5)),(A1:A5=C1)*(B1:B5), 0)

array entered. Just in case some of the numbers are duplicated among
different people.



" wrote:

Super Thanks Ron - the first formula does exactly what I was looking
for ;-)

Regards,
Martin


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default Finding max value in column A where value in B =

Try this:

=MATCH(MAX(IF($A$1:$A$5="Peter",$B$1:$B$5,0)),$B$1 :$B$5,0)

This is an array formula. It should be entered with CTRL-SHIFT-ENTER
instead of just Enter. If done properly, the formula should be enclosed in {
}

HTH,
Elkar


" wrote:

Anyone knows how to find the max value in one column where the value
in another column match a particular search criteria. The sheet looks
something like this:

A B
Peter 5
James 3
Peter 7
James 6
Peter 2

I need to find the row with the highest number for Peter. Finding the
row (row 3) would be the best, but finding the number (7) could also
do because the numbers are almost certainly unique.

Thanks in advance.




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
Finding Info from Column A and Removing it from Column B Johnny B[_2_] Excel Discussion (Misc queries) 2 March 28th 07 12:06 PM
Finding the last unused row in a column rojobrown Excel Worksheet Functions 8 October 7th 06 01:20 PM
Finding the closest number in column A and take the value in column B reefguy Excel Worksheet Functions 3 May 5th 06 07:25 PM
Finding a range from a column using VBA. Mike Echo Excel Worksheet Functions 3 May 3rd 05 08:28 AM
Finding last entry in column Phil Excel Worksheet Functions 5 January 10th 05 07:21 PM


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