Sort your data set by ID (ascending order) and by Mark (descending
order), then put this formula in D2 (assuming row 1 is for headings):
=IF(A2=A1,D1+1,1)
Copy this formula down column D - you might like to put the heading
"Rank" in D1.
Then apply autofilter on column D - choose "Custom" then "Less than"
and 4, and you will have the top three scoring subjects for each
student ID. If you wish, you could highlight the visible rows of data,
click <copy> then move the cursor to a blank area (or even another
sheet) and paste the data in - only the filtered data will be copied
across.
Hope this helps.
Pete
> I have a table of student ID's (numeric) courses and marks such as
> shown in this example:
[quoted text clipped - 29 lines]
>
> Jim