Hockey Pool Updates - Need VBA Help

dcozzy

New Member
Joined
Sep 25, 2019
Messages
1
What I am attempting to is streamline my process of updating my hockey pool each season. It is a keeper league, and so each team can keep up to 4 players from their previous season's team. The other thing is that when a player is kept, his "draft pick value" is one round higher than his previous year's draft pick value. So, if a player is drafted in the 4th round in 2018, and the team owner would like to keep the player on his team for the 2019 season, that player's value becomes a 3rd round pick.

What I would like to do is, once I have each team's "keepers" is write a code which will:

a) transfer the information I have on the current tab to a new tab, and
b) create the new keeper value at (current value -1)

The data is set us with players in column A, a "K" in column B beside players who will be kept (i.e., only want to transfer players with a "K" beside them to the new tab, in the same cell row/column as they are currently), and the draft pick value in column C. As such:

Team A
KeeperValue
Player 1K4
Player 2
Player 3K10
Player 4
Player 5K6
Player 6K8
Player 7
Player 8
Player 9
Player 10
Player 11
Player 12
Team BKeeperValue
Player 1K5
Player 2
Player 3K8
Player 4
Player 5
Player 6K3
Player 7
Player 8
Player 9K11
Player 10

<tbody>
</tbody>


I have multiple teams, each team with 12 players.

Hopefully this is enough info to get some help!

Thanks
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi & welcome to MrExcel.
How about
Code:
Sub dcozzy()
   Sheets("[COLOR=#ff0000]RC[/COLOR]").Copy , Sheets("[COLOR=#ff0000]RC[/COLOR]")
   With ActiveSheet
      .Name = "New RC"
      .Range("B:B").SpecialCells(xlBlanks).EntireRow.ClearContents
      With .Range("C2", .Range("C" & Rows.Count).End(xlUp))
         .Value = Evaluate(Replace("If(isnumber(@), @-1,if(@="""","""",@))", "@", .Address))
      End With
   End With
End Sub
Change sheet name in red to suit
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,797
Members
449,048
Latest member
greyangel23

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