Hello,
I use a macro to post the outcome of a scoresheet onto 4 different sheets. I would like to have a macro that can basically undo the changes that were just applied by the first macro in case something was forgotten to be added. It has to find the first empty row on those 4 other sheets and then count up a specific number of rows and over a specific number of columns (different for each sheet), select that data and delete/clear it.
The complete macro I use to post the changes from the outcome of a match is below and is what I need to be able to undo.
Sub UpdateTeamStatsPerMatch()
Application.ScreenUpdating = False
' TeamStats
Sheets("ScoreCardCapture").Visible = True
Sheets("WTStats").Visible = True
Sheets("ScoreCardCapture").Select
Range("A3:M4").Select
Selection.Copy
Sheets("WTStats").Select
Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("WTStats").Visible = False
' PartnerStats per Match
Sheets("WPnStats").Visible = True
Sheets("ScoreCardCapture").Select
Range("A8:I13").Select
Selection.Copy
Sheets("WPnStats").Select
Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("WpnStats").Visible = False
' PlayerStats per Match
Sheets("WPlStats").Visible = True
Sheets("ScoreCardCapture").Select
Range("A17:K28").Select
Selection.Copy
Sheets("WPlStats").Select
Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("WPlStats").Visible = False
' PlayerStats per Game
Sheets("ScoreCardCapture").Select
Range("A32:L91").Select
Selection.Copy
Sheets("OriginalFullPlayerStats").Visible = True
Sheets("OriginalFullPlayerStats").Select
Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("ScoreCard").Select
Sheets("OriginalFullPlayerStats").Visible = False
Range("Q3").Select
Sheets("ScoreCardCapture").Visible = False
Application.ScreenUpdating = True
End Sub
Thanks very much for your help.
Bookmarks