Copy and paste Column Data into new worksheet

J7House1984

New Member
Joined
Oct 30, 2020
Messages
11
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.
 

J7House1984

New Member
Joined
Oct 30, 2020
Messages
11
Office Version
  1. 365
Platform
  1. Windows
If the problem is adapting the code to cover the other columns, then post back here, otherwise start a new thread.
Okay, thank you so much. I really appreciate your help.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,790
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,033
Messages
5,639,661
Members
417,104
Latest member
Nelsini

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
Top