I kind of hope this is easy and that 20 people can jump on this and say "I know the answer to that," but I also kind of hope that this will be a challenge to you guys, since I'm sure that most of you enjoy challenges.
I think I have the steps that need to get done pretty well numbered out, and I think that there should be a way to program them, but I just have no idea how to do it.
I have a spread sheet with 31 worksheets on it (30 baseball teams, and the 1 to simulate baseball games).
What I'd like it to do is the following (this is just the first half, of finding the data and gathering it).
1) If cell Macro1!A9 is empty, end macro.
2) Locate the worksheet that has the same name as cell Macro1!A9 (in this cell, I place the team name, so if it is "SEA", it should go to the "SEA" worksheet, this way I can change it later to any team and the macro can still function)
3) Locate the cell in that worksheet that has the same name as cell Macro1!B9 (in this cell, I place the batter name, this will always be in the A column).
4) Copy cells Bx:Dx (where x is the number that relates to step 3, so if step 3 finds us cell A17, we copy B17:D17, if step 3 finds A31, we copy B31:D31).
5) Paste into range Macro1!B1:D1
6) (step 6 - 9 are going to be similar as 2 - 5, but this is for pitcher info). Locate worksheet that has the same name as Macro1!C9.
7) Locate cell within that worksheet that has the same name as cell Marco1!D9 (this will also be in the A column, as in the team worksheets, pitchers are below the batters, not off to the side).
8) Copy Bx:Dx
9) Paste into range Macro1!B2:D2
X) (these will actually be the last steps, but I'd like to be able to test them) Delete row Marco1!9.
X+1) repeat marco (until step 1 makes us stop).
Bookmarks