I'm trying to set up a single button that copies various ranges and puts them into different sheets in the first open row. The purpose is to have those copied ranges automatically graph as more rows are added (this part isn't perfect but I'm content with it). There are 5 groups of ranges that have to go into their own 5 specific sheets.
This is what I have so far and it worked at some point for a couple of the sheets individually but I can't remember what I changed and now it doesn't even work when I separate them.
This is what I have so far and it worked at some point for a couple of the sheets individually but I can't remember what I changed and now it doesn't even work when I separate them.
Code:
Sub Button17_Click()
[LEFT]
[COLOR=#222222][FONT=Verdana]'Trial Scores'
Application.ScreenUpdating = False
[/FONT][/COLOR][/LEFT]
Dim copySheet As Worksheet
Dim pasteSheet As Worksheet
Dim Rng As Range
Set Rng = Union(Range("e3:i12"), Range("e14:23"), Range("e25:i34"), Range("e36:i45"), Range("e47:i56"))
Set copySheet = Sheet1
Set pasteSheet = Sheet2
Rng.Copy
pasteSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
'Trial Block Scores'
Dim Rng As Range
Set Rng = Union(Range("e13:i13"), Range("e24:24"), Range("e35:i35"), Range("e46:i36"), Range("e57:i57"))
Set copySheet = Sheet1
Set pasteSheet = Sheet3
Rng.Copy
pasteSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
'Trial Block Cold Probe per day'
Set copySheet = Sheet1
Set pasteSheet = Sheet4
copySheet.Range("E13:i13").Copy
pasteSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
'Trial Score Cold Probe per trial block DONE'
Dim Rng As Range
Set Rng = Union(Range("e3:i3"), Range("e14:i14"), Range("e25:i25"), Range("e36:i36"), Range("e47:i47"))
Set copySheet = Sheet1
Set pasteSheet = Sheet2
Rng.Copy
pasteSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
'Trial Score Cold Probe per day'
Set copySheet = Sheet1
Set pasteSheet = Sheet4
copySheet.Range("E3:i3").Copy
pasteSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
Last edited by a moderator: