Trasfering data with vba [Closed]

Moe - Oct 11, 2016 at 07:39 AM - Latest reply: rogerm34 4 Posts Monday October 17, 2016Registration date November 2, 2016 Last seen
- Nov 2, 2016 at 10:56 AM
Hello,
I have sheet1 of data with 2 columns with 26 row
And i want to copy this data to sheet2 but when i copy this data it overwrite the old one and thats my problem
What i need when i copy this data it autofit the first empty row in sheet2 without replacing the old one
I need to add commande button and get the best vba code pls



See more 

3 replies

ac3mark 9157 Posts Monday June 3, 2013Registration dateModeratorStatus April 18, 2018 Last seen - Oct 11, 2016 at 05:00 PM
0
Helpful
We do not provide turn key solutions. If you were stuck, we could help, but you have to post some code first. I encourage you to RECORD a macro, and see how it WRITES the code, then change the code with variables!

It's kind of fun to do the impossible! -Walter Elias Disney
rogerm34 4 Posts Monday October 17, 2016Registration date November 2, 2016 Last seen - Oct 17, 2016 at 04:35 PM
0
Helpful
Open an excel workbook
Enter some data in Sheet1 at A1:B10
Press Alt+F11 to open VBA Editor
Insert a Module for Insert Menu
Copy the above code and Paste in the code window
Save the file as macro enabled workbook
Press F5 to run it
rogerm34 4 Posts Monday October 17, 2016Registration date November 2, 2016 Last seen - Nov 2, 2016 at 10:56 AM
0
Helpful
Method 1: In this method, we do not required to activate worksheet. We have to mention the source and target range. This is the simple method to copy the data.
Method 2: In this method, we have to activate the worksheet and paste in a range of active worksheet.