Find MAX for sumproduct

M

Mike

Good evening...
I have the formula: =SUMPRODUCT((B1:B5)*(A1:A5="baltimore")) to give the
sum of numbers that match Baltimore.
e.g.:

A B
--------------------------------
1. New York 85
2. Baltimore 33
3. New York 38
4. New York 77
5. Baltimore 45

I want to write the formula to find the largest (MAX) number that matches
Baltimore, in this case 45.

Any help would be appreciated.

Mike
 
M

Max

Good morning ! (It's already 9 am, 29 Apr over here <g>)

Try, array-entered (Press CTRL+SHIFT+ENTER):
=MAX(IF($A$1:$A$5="Baltimore",$B$1:$B$5))
 
M

Mike

Thanks Max, works great!!
Mike
Max said:
Good morning ! (It's already 9 am, 29 Apr over here <g>)

Try, array-entered (Press CTRL+SHIFT+ENTER):
=MAX(IF($A$1:$A$5="Baltimore",$B$1:$B$5))
 
Top