View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Index function and changing criteria help.

wrote
Max,
The sheet you built is very impressive. I wouldn't have even come
close to that. My question for you now is: Is it possible to have it
so I have baseball, then 10 rows down or so, football and all the
information for everything shows up on the same page? I like the drop
down list idea, but it may not work for me. Please let me know your
thoughts when you can. Thanks.


Here's some thoughts ..

A sample construct is available at:
http://cjoint.com/?iwfs2J6Ggd
Auto-List 1st xx by game in new sht.xls
(Link above is good for 2 weeks)

Assume source data in sheet: X, cols A to C, data within A2:C9000.
The key cols are col A ie the game, and col C = scores (Col B = Players)

Assume the 35 unique categories are listed in a defined range: Game
=X!$N$3:$N$37
[Presume the 35 uniques list is at hand. Or just use advanced filter
uniques on col A to extract the list]

In another sheet: Y (say), paste the col labels in B1:D1 : Game, Player,
Score

Put in A2:
=IF(X!A2="","",X!C2-ROW()/10^10)
Copy A2 down to A9000 to cover the max expected extent of data in X (Leave
A1 empty)

Put in B2:
=IF(MOD(ROW(A1)-1,10)<0,"",IF(ISERROR(INDEX(Game,INT((ROW(A1)-1)/10)+1)),"",IF(INDEX(Game,INT((ROW(A1)-1)/10)+1)=0,"",INDEX(Game,INT((ROW(A1)-1)/10)+1))))

Put in C2, array-enter the formula, ie press CTRL+SHIFT+ENTER (instead of
just pressing ENTER):
=IF(INDEX(Game,INT((ROW(A1)-1)/10)+1)=0,"",INDEX(X!B$2:B$9000,MATCH(LARGE(IF(X!$A $2:$A$9000=INDEX(Game,INT((ROW(A1)-1)/10)+1),$A$2:$A$9000),MOD(ROW(A1)-1,10)+1),$A$2:$A$9000,0)))
Copy C2 to D2

Select B2:D2, fill down by 350 rows (as 35 categories x 10 rows each = 350
rows)

Cols B to D will yield the required results. The listing of all the 35
categories will appear in col B (only in the 1st cell, in steps of 10), with
the 1st 10 players and scores listed in cols C & D in descending order by
scores. Tied score cases within the 1st 10, if any, within any category,
will be listed in the same relative order that these appear in X. Hide away
col A (arb tiebreaker col), or just format the font in white to mask.

Adapt to suit. Change the "10" in the MOD(...) & INT(...) parts to "20" in
the formulas in B2:D2 if you want to list the 1st 20 for each category, Then
fill down correspondingly by 700 rows (as 35 categories x 20 rows each = 700
rows). Take care to re-array-enter the formula in C2 whenever you edit.
Ensure this by viewing within the formula bar that the curly braces { } are
inserted by Excel as proof that the array-entering is done correctly before
copying C2 across to D2 and filling down.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---