J7House1984
New Member
- Joined
- Oct 30, 2020
- Messages
- 21
- Office Version
- 365
- Platform
- Windows
Hello,
I am at a very beginner level of knowledge everything I've done in VBA has been self-taught.
I am working on a project that I need some assistance with. I have been tasked with automating a simple copy and paste of multiple columns into a new worksheet template.
I have a data sheet that will be copy and paste into the "InquickerData" Tab. The data will be of various lengths some times hundreds of entries sometimes thousands or more. Each month will potentially be different. I have a basic script that I think can work but I am having some error issues with it. Also, if there is a better way to do this I would greatly appreciate any and all input.
Below is the Script I am working on:
I can also send an example workbook for reference if that helps.
I am at a very beginner level of knowledge everything I've done in VBA has been self-taught.
I am working on a project that I need some assistance with. I have been tasked with automating a simple copy and paste of multiple columns into a new worksheet template.
I have a data sheet that will be copy and paste into the "InquickerData" Tab. The data will be of various lengths some times hundreds of entries sometimes thousands or more. Each month will potentially be different. I have a basic script that I think can work but I am having some error issues with it. Also, if there is a better way to do this I would greatly appreciate any and all input.
Below is the Script I am working on:
VBA Code:
Sub MM1()
'Copy "Registration Date" Data
Worksheets("InquickerData").Range("M2:M1048576").Copy
'PasteSpecial Values Only
Worksheets("UploadTemplate").Range("M8:M1048576").PasteSpecial Paste:=xlPasteValues
'Copy "First Name" Data
Worksheets("InquickerData").Range("S2:S1048576").Copy
'PasteSpecial Values Only
Worksheets("UploadTemplate").Range("S8:S1048576").PasteSpecial Paste:=xlPasteValues
'Copy "Middle Initial" Data
Worksheets("InquickerData").Range("T2:T1048576").Copy
'PasteSpecial Values Only
Worksheets("UploadTemplate").Range("T8:1048576").PasteSpecial Paste:=xlPasteValues
'Clear Clipboard (removes data around your original data set)
Application.CutCopyMode = False
End Sub
I can also send an example workbook for reference if that helps.