Hi,
Would you please be so kind and assist me with a macro to extract specific data within a spreadsheet. The specs are. I have a list of students 30+ who rights exams every week and I want to extract the top 3 marks and names each week. Should there be more than 3 student with the same mark in the top 3 then I want to see all those students even if it's more that 3. Below is a example of how I did it manually.
[TABLE="width: 272"]
<tbody>[TR]
[TD]Name[/TD]
[TD]week 1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]week 2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]week 3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Anna[/TD]
[TD="align: right"]21[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]23[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Carl[/TD]
[TD="align: right"]18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]20[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]19[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Jill[/TD]
[TD="align: right"]16[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]21[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]29[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="align: right"]27[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]23[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Liz[/TD]
[TD="align: right"]19[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]22[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]21[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD="align: right"]29[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]27[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Sandra[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]22[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Susan[/TD]
[TD="align: right"]20[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]23[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]19[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Tim[/TD]
[TD="align: right"]24[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]20[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Peter[/TD]
[TD="align: right"]29[/TD]
[TD] [/TD]
[TD]Anna[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD]Jill[/TD]
[TD="align: right"]29[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]John[/TD]
[TD="align: right"]27[/TD]
[TD] [/TD]
[TD]John[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD]Peter[/TD]
[TD="align: right"]27[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Sandra[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD]Peter[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD]Anna[/TD]
[TD="align: right"]23[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[TD]Sandra[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD]John[/TD]
[TD="align: right"]23[/TD]
[/TR]
[TR]
[TD]
Thank you [/TD]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[TD]Tim[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody><colgroup><col><col><col><col><col><col><col><col><col></colgroup>[/TABLE]
Would you please be so kind and assist me with a macro to extract specific data within a spreadsheet. The specs are. I have a list of students 30+ who rights exams every week and I want to extract the top 3 marks and names each week. Should there be more than 3 student with the same mark in the top 3 then I want to see all those students even if it's more that 3. Below is a example of how I did it manually.
[TABLE="width: 272"]
<tbody>[TR]
[TD]Name[/TD]
[TD]week 1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]week 2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]week 3[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Anna[/TD]
[TD="align: right"]21[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]23[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Carl[/TD]
[TD="align: right"]18[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]20[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]19[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Jill[/TD]
[TD="align: right"]16[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]21[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]29[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD="align: right"]27[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]23[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Liz[/TD]
[TD="align: right"]19[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]22[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]21[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD="align: right"]29[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]27[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Sandra[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]22[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Susan[/TD]
[TD="align: right"]20[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]23[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]19[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Tim[/TD]
[TD="align: right"]24[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]20[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Peter[/TD]
[TD="align: right"]29[/TD]
[TD] [/TD]
[TD]Anna[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD]Jill[/TD]
[TD="align: right"]29[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]John[/TD]
[TD="align: right"]27[/TD]
[TD] [/TD]
[TD]John[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD]Peter[/TD]
[TD="align: right"]27[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]Sandra[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD]Peter[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD]Anna[/TD]
[TD="align: right"]23[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[TD]Sandra[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD]John[/TD]
[TD="align: right"]23[/TD]
[/TR]
[TR]
[TD]
Thank you [/TD]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[TD]Tim[/TD]
[TD="align: right"]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody><colgroup><col><col><col><col><col><col><col><col><col></colgroup>[/TABLE]