LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Max
 
Posts: n/a
Default

One way, if you don't mind a bit of "distributed processing" <g,
try this non-array set-up ..

Assume the source data below is in Sheet1,
cols A and B, data from row2 down

Acct Amount
A 10
B 20
C 12
D 45
E 34
F 5
G 45
A 5
C 10
D 8

etc

We'll use 4 empty cols to the right (D to G)

Put:

In D2: =IF(A2="","",IF(COUNTIF($A$2:A2,A2)1,"",ROW()))

In E2:
=IF(ISERROR(SMALL(D:D,ROWS($A$1:A1))),"",INDEX(A:A ,MATCH(SMALL(D:D,ROWS($A$1
:A1)),D:D,0)))

In F2: =IF(E2="","",SUMIF(A:A,E2,B:B))
In G2: =IF(F2="","",F2-ROW()/10^10)

Select D2:G2 and copy down to say G1000
to cover the max expected data range in cols A and B

(Col E will read col D to drive out a list of unique accts, col F sums the
amounts up by the unique accts in col E, and col G will act as an arbitrary
tie-breaker col in case there are tied amounts in col F)

In Sheet2
------------
With the same headers in A1:B1 : Acct Amount

Put in A2:

=IF(ISERROR(LARGE(Sheet1!$G:$G,ROWS($A$1:A1))),"", INDEX(Sheet1!E:E,MATCH(LAR
GE(Sheet1!$G:$G,ROWS($A$1:A1)),Sheet1!$G:$G,0)))

Copy across to B2, fill down to B1000
(cover the same range as in Sheet1)

Cols A and B will return a *full* descending sort of all the accounts by
amount, with accounts having tied amounts (if any) appearing in the same
relative order that they are in Sheet1

For the sample data in Sheet1, you'll get:

Acct Amount
D 53
G 45
E 34
C 22
B 20
A 15
F 5
( rest are blanks: "" )

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"boris" wrote in message
...
in theory, something along those lines. Problem is that
this assumes you have unique values to rank, whereas I am
looking for it to sum, within the array itself the amounts
of all the listed accounts BY account, then evaluate THAT
virtual list for the rank. Any more ideas on how to do
that?





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
Where is the bug in my array? Gail Gurman Excel Discussion (Misc queries) 1 January 25th 05 12:36 AM
Array Manipulation [email protected] Excel Worksheet Functions 4 December 25th 04 09:15 AM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
VBA Import of text file & Array parsing of that data Dennis Excel Discussion (Misc queries) 4 November 28th 04 10:20 PM


All times are GMT +1. The time now is 05:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"