Sum Large, two criterias

F

freseh

Hello

I need some help with a function that should sum the three larges
values from a table depending on which group is selected.

For example (ignore the ....)

Amount...Group
200..........B
300..........B
100..........B
900..........A
600..........A
800..........A
300..........A
200..........B
100..........B
200..........A

In this case I want to sum the three largest values of group A, ie
2300.

My best guess is something like this:
{=SUM(LARGE(SUMIF(grupp;"A";amount);ROW(INDIRECT("1:3"))))}
But it won't work........so some help is needed.

Thanks in advance
 
J

Jason Morin

One way:

=SUM(LARGE(IF(B1:B10="B",A1:A10),{1,2,3}))

Array-entered, meaning press ctrl/shift/enter after
inserting the formula. XL will place {} around the
formula.

HTH
Jason
Atlanta, GA
 
D

Domenic

=SUM(LARGE(IF(B2:B11="A",A2:A11),{1,2,3}))

OR

=SUM(LARGE(IF(B2:B11="A",A2:A11),ROW(INDIRECT("1:3"))))

...both formulas to be entered using CONTROL+SHIFT+ENTER.

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top