sum of top 5 base on one condition

L

luvgreen

Hi Experts. I need your advise on how to sum top 5 base on one condition, say
sum top 5 of A. It should be 10+12+7+4+2 = 35. Thanks much!!!
A 1
A 2
C 3
A 4
B 5
A 7
D 9
A 10
A 12
 
B

Biff

Hi!

I'm assuming a lot here, but, try this:

Entered as an array using the key combination of CTRL,SHIFT,ENTER:

=SUM(LARGE(IF(A1:A9="A",B1:B9),{1,2,3,4,5}))

Biff
 
L

luvgreen

Thank you very much. That's exactly what I need.

Biff said:
Hi!

I'm assuming a lot here, but, try this:

Entered as an array using the key combination of CTRL,SHIFT,ENTER:

=SUM(LARGE(IF(A1:A9="A",B1:B9),{1,2,3,4,5}))

Biff
 
Top