Catlover22
New Member
- Joined
- Apr 27, 2016
- Messages
- 5
The workbook that I am starting in is called "Rachael"
The workbook that I am trying to copy into is called "Jessica"
This workbook has two tabs that I need to paste into
“Summary” and “Summary Fall”
The range that I need to copy the information into is:
X 8:61 - "Summary"
Breaks at the end of rows: 14, 20, 26, 31, 33, 37, 41, 49, 61
X 8:61 - "Summary Fall"
Breaks at the end of rows: 14, 23, 30, 36, 40, 45, 50, 62
The breaks mean that individual sections of ranges have to be copied into individual sections within X 8:61
(i.e. I have data in one workbook range A1:4. I need to copy it into another workbook but there is a break at the end of row 2, and a TOTAL row is there, so I need to fill the remaining A3 and A4 into the line that comes AFTER the TOTAL row)
Below is what I have (I just recorded it, I did not try to write it) but it does not copy it to the other workbook.
The first macro "CopyFormulas2" includes the range of data that I need to copy. This is a separate macro that does work correctly, I just included it in here so that you guys could see the specific ranges that I needed to copy into the other workbook.
Sub CopyFormulas2()
'
' CopyFormulas2 Macro
'
'
Selection.AutoFill Destination:=Range("D6:D12"), Type:=xlFillDefault
Range("D6:D12").Select
Range("G7").Select
Selection.AutoFill Destination:=Range("G7:G12"), Type:=xlFillDefault
Range("G7:G12").Select
Range("G8").Select
Selection.AutoFill Destination:=Range("G6:G8"), Type:=xlFillDefault
Range("G6:G8").Select
Range("D14").Select
Selection.AutoFill Destination:=Range("D14:D23"), Type:=xlFillDefault
Range("D14:D23").Select
Range("G16").Select
Selection.AutoFill Destination:=Range("G16:G23"), Type:=xlFillDefault
Range("G16:G23").Select
Range("G16").Select
Selection.AutoFill Destination:=Range("G14:G16"), Type:=xlFillDefault
Range("G14:G16").Select
ActiveWindow.SmallScroll Down:=15
Range("D29").Select
Selection.AutoFill Destination:=Range("D29:D37"), Type:=xlFillDefault
Range("D29:D37").Select
Range("D29").Select
Selection.AutoFill Destination:=Range("D25:D29"), Type:=xlFillDefault
Range("D25:D29").Select
Range("G28").Select
Selection.AutoFill Destination:=Range("G28:G37"), Type:=xlFillDefault
Range("G28:G37").Select
Range("G28").Select
Selection.AutoFill Destination:=Range("G25:G28"), Type:=xlFillDefault
Range("G25:G28").Select
ActiveWindow.SmallScroll Down:=12
Range("D43").Select
Selection.AutoFill Destination:=Range("D43:D52"), Type:=xlFillDefault
Range("D43:D52").Select
Range("D43").Select
Selection.AutoFill Destination:=Range("D39:D43"), Type:=xlFillDefault
Range("D39:D43").Select
Range("G46").Select
Selection.AutoFill Destination:=Range("G46:G52"), Type:=xlFillDefault
Range("G46:G52").Select
Range("G46").Select
Selection.AutoFill Destination:=Range("G39:G46"), Type:=xlFillDefault
Range("G39:G46").Select
Range("D57").Select
Selection.AutoFill Destination:=Range("D57:D65"), Type:=xlFillDefault
Range("D57:D65").Select
Range("D57").Select
Selection.AutoFill Destination:=Range("D54:D57"), Type:=xlFillDefault
Range("D54:D57").Select
Range("G59").Select
Selection.AutoFill Destination:=Range("G59:G65"), Type:=xlFillDefault
Range("G59:G65").Select
Range("G59").Select
Selection.AutoFill Destination:=Range("G54:G59"), Type:=xlFillDefault
Range("G54:G59").Select
ActiveWindow.SmallScroll Down:=-60
Range("D6").Select
End Sub
(this is the one that I am really interested in knowing how to do)
Sub CopyIntoCatTool()
'
' CopyIntoCatTool Macro
'
'
Range("D6:D12").Select
Application.CutCopyMode = False
Selection.Copy
Range("D14:D19").Select
Application.CutCopyMode = False
Selection.Copy
Range("D25:D35").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=15
Range("D39:D48").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=9
Range("D54:D61").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=15
Range("D67:D78").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=-48
Range("G6:G12").Select
Application.CutCopyMode = False
Selection.Copy
Range("G14:G22").Select
Application.CutCopyMode = False
Selection.Copy
Range("G25:G37").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=12
Range("G39:G52").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=21
Range("G54:G65").Select
Application.CutCopyMode = False
Selection.Copy
Application.CutCopyMode = False
End Sub
The workbook that I am trying to copy into is called "Jessica"
This workbook has two tabs that I need to paste into
“Summary” and “Summary Fall”
The range that I need to copy the information into is:
X 8:61 - "Summary"
Breaks at the end of rows: 14, 20, 26, 31, 33, 37, 41, 49, 61
X 8:61 - "Summary Fall"
Breaks at the end of rows: 14, 23, 30, 36, 40, 45, 50, 62
The breaks mean that individual sections of ranges have to be copied into individual sections within X 8:61
(i.e. I have data in one workbook range A1:4. I need to copy it into another workbook but there is a break at the end of row 2, and a TOTAL row is there, so I need to fill the remaining A3 and A4 into the line that comes AFTER the TOTAL row)
Below is what I have (I just recorded it, I did not try to write it) but it does not copy it to the other workbook.
The first macro "CopyFormulas2" includes the range of data that I need to copy. This is a separate macro that does work correctly, I just included it in here so that you guys could see the specific ranges that I needed to copy into the other workbook.
Sub CopyFormulas2()
'
' CopyFormulas2 Macro
'
'
Selection.AutoFill Destination:=Range("D6:D12"), Type:=xlFillDefault
Range("D6:D12").Select
Range("G7").Select
Selection.AutoFill Destination:=Range("G7:G12"), Type:=xlFillDefault
Range("G7:G12").Select
Range("G8").Select
Selection.AutoFill Destination:=Range("G6:G8"), Type:=xlFillDefault
Range("G6:G8").Select
Range("D14").Select
Selection.AutoFill Destination:=Range("D14:D23"), Type:=xlFillDefault
Range("D14:D23").Select
Range("G16").Select
Selection.AutoFill Destination:=Range("G16:G23"), Type:=xlFillDefault
Range("G16:G23").Select
Range("G16").Select
Selection.AutoFill Destination:=Range("G14:G16"), Type:=xlFillDefault
Range("G14:G16").Select
ActiveWindow.SmallScroll Down:=15
Range("D29").Select
Selection.AutoFill Destination:=Range("D29:D37"), Type:=xlFillDefault
Range("D29:D37").Select
Range("D29").Select
Selection.AutoFill Destination:=Range("D25:D29"), Type:=xlFillDefault
Range("D25:D29").Select
Range("G28").Select
Selection.AutoFill Destination:=Range("G28:G37"), Type:=xlFillDefault
Range("G28:G37").Select
Range("G28").Select
Selection.AutoFill Destination:=Range("G25:G28"), Type:=xlFillDefault
Range("G25:G28").Select
ActiveWindow.SmallScroll Down:=12
Range("D43").Select
Selection.AutoFill Destination:=Range("D43:D52"), Type:=xlFillDefault
Range("D43:D52").Select
Range("D43").Select
Selection.AutoFill Destination:=Range("D39:D43"), Type:=xlFillDefault
Range("D39:D43").Select
Range("G46").Select
Selection.AutoFill Destination:=Range("G46:G52"), Type:=xlFillDefault
Range("G46:G52").Select
Range("G46").Select
Selection.AutoFill Destination:=Range("G39:G46"), Type:=xlFillDefault
Range("G39:G46").Select
Range("D57").Select
Selection.AutoFill Destination:=Range("D57:D65"), Type:=xlFillDefault
Range("D57:D65").Select
Range("D57").Select
Selection.AutoFill Destination:=Range("D54:D57"), Type:=xlFillDefault
Range("D54:D57").Select
Range("G59").Select
Selection.AutoFill Destination:=Range("G59:G65"), Type:=xlFillDefault
Range("G59:G65").Select
Range("G59").Select
Selection.AutoFill Destination:=Range("G54:G59"), Type:=xlFillDefault
Range("G54:G59").Select
ActiveWindow.SmallScroll Down:=-60
Range("D6").Select
End Sub
(this is the one that I am really interested in knowing how to do)
Sub CopyIntoCatTool()
'
' CopyIntoCatTool Macro
'
'
Range("D6:D12").Select
Application.CutCopyMode = False
Selection.Copy
Range("D14:D19").Select
Application.CutCopyMode = False
Selection.Copy
Range("D25:D35").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=15
Range("D39:D48").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=9
Range("D54:D61").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=15
Range("D67:D78").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=-48
Range("G6:G12").Select
Application.CutCopyMode = False
Selection.Copy
Range("G14:G22").Select
Application.CutCopyMode = False
Selection.Copy
Range("G25:G37").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=12
Range("G39:G52").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.SmallScroll Down:=21
Range("G54:G65").Select
Application.CutCopyMode = False
Selection.Copy
Application.CutCopyMode = False
End Sub