Thread: Top value
View Single Post
  #9  
Old June 3rd, 2010, 02:55 PM posted to microsoft.public.excel.misc
Max
external usenet poster
 
Posts: 8,574
Default Top value

Here's a pure non-array formulas play which will achieve your multiple
objectives, viz: extract unique names, total up scores per name then
auto-sort in descending order with tiebreaks (to cater for possibility of
tied totals)

Assume your source data is in sheet: x, in A2:B2 down
In another sheet, place in
A2: =IF(x!A2="","",IF(COUNTIF(x!A$2:A2,x!A2)1,"",ROW( )))
B2: =INDEX(x!A:A,SMALL(A:A,ROWS($1:1)))
C2: =SUMIF(x!A:A,B2,x!B:B)
D2: =IF(ISERROR(B2),"",C2-ROW()/10^10)
E2:
=IF(ROWS($1:1)COUNT($D:$D),"",INDEX(B:B,MATCH(LAR GE($D:$D,ROWS($1:1)),$D:$D,0)))
Copy E2 to F2. Select A2:F2, copy down to cover the max expected extent of
source data in x, eg down to F100. Minimize/hide away cols A to D. Cols E & F
will return the required results, ie a uniques listing of the names-total
scores, sorted in descending order by the scores. Names with tied scores, if
any, will be listed in the same relative order that they appear within the
source data. Read off the top xx as desired.
--
Max
Singapore
---
"puiuluipui" wrote:
Hi, the problem is that i need this top values in another sheet. that's why i
need the formulas. and the sheet with the database is connected to a database
and i cannot modify it.
So i need a formula to make the sum by names and than to display in another
sheet, the top name and sum. In the cell below i need the second top value
and name....and so on....