Summing based on N largest / smallest values
=SUM(LARGE(IF((A1:A20="Cat")*(B1:B20="Black"),C1:C 20),{1,2,3}))
which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
wrote in message
...
Is it possible to sum a column of values based on the values of
another column being the N largest / smallest?
An example might help undestand the concept...
Position Animal Colour Volume Value
1 Cat Brown 5,000 6,100
2 Dog Brown 4,900 6,200
3 Cat Brown 4,800 6,300
4 Dog Brown 4,700 6,400
5 Cat Brown 4,600 6,500
6 Dog Brown 4,500 6,600
7 Cat Brown 4,400 6,700
8 Dog Brown 4,300 6,800
9 Cat Brown 4,200 6,900
10 Dog Brown 4,100 7,000
11 Cat Black 4,000 7,100
12 Dog Black 3,900 7,200
13 Cat Black 3,800 7,300
14 Dog Black 3,700 7,400
15 Cat Black 3,600 7,500
16 Dog Black 3,500 7,600
17 Cat Black 3,400 7,700
18 Dog Black 3,300 7,800
19 Cat Black 3,200 7,900
20 Dog Black 3,100 8,000
I'm looking to see the total Volume for the first three instances of
Black Cats.
(The answer i'm looking for is 18,000)
Hope someone can help...
|