A couple of changes from last night's posting - don't use letters for
the age group, and for the time difference you need to subtract it
from a number larger than the timings in your data. I set up a test
sheet1 using the columns you specified earlier, and put this formula
in column P (so that it is out of the way from printing):
=((D2-6)/2&TEXT(L2,"000")&TEXT(999-K2,"0000.0"))*1
This gave me numbers like 10560986.8 and 30720986.0 for your two
examples, where the first number (1, 2 or 3) represents the age group,
the next three digits are the points, and the last five digits
represent the time difference (subtracted from 999 seconds).
Incidentally, if you put this formula in Q2 and copy down:
=LARGE(P$2
$44,ROW(A1))
you will see all the numbers beginning with 3, followed by the 2's and
finally the 1's, effectively sorted. I set up a table with data in
rows 2 to 44, so adjust to suit your data.
In Sheet2 I assumed you would want some headings to separate each
block of top-4 age groups, so I put this array* formula in P5 (again
to keep it away from any printing):
=LARGE(IF(Sheet1!D$2
$44=8,Sheet1!P$2
$44),ROW(A1))
*As this is an array formula, then once you have typed it in (or
subsequently edit it) you need to use CTRL-SHIFT-ENTER to commit it
instead of the usual ENTER. If you do this correctly then Excel will
wrap the formula in curly braces { } when viewed in the formula bar -
you must not type these yourself.
This formula can then be copied down into P6
8, and it is finding the
top four in age group 8. I put this array* formula in P13 and copied
it into P14
16:
=LARGE(IF(Sheet1!D$2
$44=10,Sheet1!P$2
$44),ROW(A1))
These will find the top 4 in age group 10. This array* formula went
into P21 and was copied into P22
24:
=LARGE(IF(Sheet1!D$2
$44=12,Sheet1!P$2
$44),ROW(A1))
and this is looking at the 12 year olds.
I put this formula in Q5 of Sheet2 and copied it down into cells
adjacent to those where the array formulae were:
=MATCH(P5,Sheet1!P$2
$44,0)
and then in A5 under a heading "Name" I used this formula:
=INDEX(Sheet1!C$2:C$44,$Q5)
This was copied into A4:A6, A13:A16 and A21:A24, to give the names of
the top-4 in each age group. If you also want to bring across the age,
points or time, then you can use these formula in row 5 and copy down
as appropriate:
=INDEX(Sheet1!D$2
$44,$Q5) - age
=INDEX(Sheet1!L$2:L$44,$Q5) - points
=INDEX(Sheet1!K$2:K$44,$Q5) - time
If you use more than row 44 then you will have to adjust the ranges in
all these formulae to suit your data. I think this does all that you
wanted.
Hope this helps.
Pete