Need help with macro

henrybrent1974

New Member
Joined
Oct 11, 2017
Messages
19
I am defiantly new to macros. i have learned a lot from this forum but cant seem to figure out how to write this macro.
I am trying to take 3 player from each weekly results based on the previous week. For example, the first week the top 3 players would qualify. In the second week if any of the top 3 are the same as week #1 top 3 the take 4th place and so on. need this to continue for 30 weeks.

[TABLE="class: grid, width: 120"]
<tbody>[TR]
[TD][/TD]
[TD]Week #1
[/TD]
[/TR]
[TR]
[TD]1st
[/TD]
[TD]Jason
[/TD]
[/TR]
[TR]
[TD]2nd
[/TD]
[TD]Troy
[/TD]
[/TR]
[TR]
[TD]3rd
[/TD]
[TD]Mike
[/TD]
[/TR]
[TR]
[TD]4th
[/TD]
[TD]Ricky
[/TD]
[/TR]
[TR]
[TD]5th
[/TD]
[TD]John
[/TD]
[/TR]
[TR]
[TD]6th
[/TD]
[TD]Mark
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 120"]
<tbody>[TR]
[TD][/TD]
[TD]Week #2
[/TD]
[/TR]
[TR]
[TD]1st
[/TD]
[TD]Mike
[/TD]
[/TR]
[TR]
[TD]2nd
[/TD]
[TD]Joe
[/TD]
[/TR]
[TR]
[TD]3rd
[/TD]
[TD]Jake
[/TD]
[/TR]
[TR]
[TD]4th
[/TD]
[TD]Jason
[/TD]
[/TR]
[TR]
[TD]5th
[/TD]
[TD]Bubba
[/TD]
[/TR]
[TR]
[TD]6th
[/TD]
[TD]Trey
[/TD]
[/TR]
</tbody>[/TABLE]

So my qualifiers so for would be:
1. Jason
2. Troy
3. Mike
4. Joe
5. Jake
6. Bubba

Any help would be appreciated so much
 
If for any week that 5th place would qualify then I would need it to take 6th place also ..
Try adding in the blue line of code where shown
Rich (BB code):
    Got = Got + 1
    If r = 5 Then d(rA.Cells(r + 1, 2).Value) = 1
  End If
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top