Copy and paste Column Data into new worksheet

J7House1984

New Member
Joined
Oct 30, 2020
Messages
21
Office Version
  1. 365
Platform
  1. 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:

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.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,047
Members
448,940
Latest member
mdusw

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