Macro for Fantasy Football Draft Board

BMil8

Board Regular
Joined
Aug 9, 2010
Messages
153
Office Version
  1. 365
Hello!

I have a fantasy football draft board on one tab (called Draft Board), and another tab that has player profiles (called Profiles). What I want to happen is when I enter the name of a player in one of the draft spots, it automatically jumps to the player profile on the other tab, stays there for 10 seconds, and then returns back to the tab with the draft board.

For example, let's say I enter the name Arian Foster for the first pick. As soon as I hit enter I want it to find the name Arian Foster on the Profile tab, stay there for 10 seconds, and then go back to the original tab. And then when the second person picks Ray Rice, I want it to jump to his profile. Does that make sense? I'm sure I will need to set up a macro for each individual draft spot...but is this even possible?

Thanks!,
Brian
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
An alternative to using macros, you could use VLOOKUP formulas where all the categories are listed out in your first sheet (off to the side or something) and the other sheet is a database of player information. When you enter the name in the first sheet the Vlookups simply display the data based on the player's name right there on that sheet.
 
Upvote 0
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
    Sheets("Profiles").Activate
    Sheets("Profiles").Range("A" & WorksheetFunction.Match(Target.Value, Sheets("Profiles").Columns(1), False)).Select
    Application.Wait (Now + TimeValue("0:00:10"))
    Sheets(Target.Worksheet.Index).Activate
    Target.Select
End If
End Sub

Open the VBA Editor and copy this code into the code of the Draft Board worksheet.
A1 is currently the cell where the names are being entered. You can change this by changing the cell in the IF.
The names are being looked for in column 1, you can change this by changing the number within Columns(1).
 
Upvote 0

Forum statistics

Threads
1,218,217
Messages
6,141,186
Members
450,341
Latest member
switfyu2

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