View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jen[_4_] Jen[_4_] is offline
external usenet poster
 
Posts: 47
Default Showing Cummulative Top5 results with an array-formula...?

Hi Max,

=SUM(LARGE($D$5:$D$200,ROW(INDIRECT("1:"&6-ROW(INDIRECT("1:5"))))))
Works wonderfully!

Can I please extend it one more level...?
How would it look like if want to check on another condition:
The Top5 accumulative values IF the person (in column B) is called "Smith"

SORT OF:
=SUM(IF(B5:B200="Smith",LARGE($D$5:$D$200,ROW(INDI RECT("1:"&6-ROW(INDIRECT("1:5"))))),0))
But this does not seem to do the trick.

Jen


"Max" wrote in message
...
You could also try ..

Source range assumed in D5:D200

Put this in say, E5, array-entered with CSE*:
=SUM(LARGE($D$5:$D$200,ROW(INDIRECT("1:"&6-ROWS($1:1)))))
Copy E5 down by 5 rows to E9 to return desired results, viz:

SumTop5-values: Being: 1875
SumTop4-Values: Being: 1875
SumTop3-values: Being:1750
SumTop2-values: Being 1500
SumTop1-Value: Being 1000


*press CTRL+SHIFT+ENTER to confirm the formula

Alternatively, select a 5 cell col range, eg select F5:F9, then place this
into the formula bar and array-enter with CSE (multi-cell array-enter):
=SUM(LARGE($D$5:$D$200,ROW(INDIRECT("1:"&6-ROW(INDIRECT("1:5"))))))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Jen" wrote:
Hi There,

Below are array-formulas, so use Ctrl+Shift+Enter:

I can show the Top5 of my range D5:D200 as follows:
=LARGE($D$5:$D$200,ROW(INDIRECT("1:5")))

Suppose this results in a range with output: {1000,500,250,125,0}

I can show the sum of the Top5 as follows:
=SUM(LARGE($D$5:$D$18,ROW(INDIRECT("1:5"))))
Results in {1875}

What I would like to achieve is an array-formula that shows:
SumTop5-values: Being: 1875
SumTop4-Values: Being: 1875
SumTop3-values: Being:1750
SumTop2-values: Being 1500
SumTop1-Value: Being 1000


Hope you cam help?
Thanks in advance,
jen