Append data from one table to another

MAdams

New Member
Joined
Sep 15, 2017
Messages
1
Hi there,

I'm new to using Macros within excel and I'm trying to write one that grabs data from 11 columns with a varying number of rows and appends it to the new free row in another table.

I know this should be relatively easy, but as I said I'm new to this.

Any help would be greatly appreciated
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hello, without a more complete idea of how your data looks, this is the best I could do:
Code:
Sub MoveData()

Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim lrow1 As Long
Dim lrow2 As Long

Set ws1 = Sheets("Sheet1") 'Adjust sheet name
Set ws2 = Sheets("Sheet2") 'Adjust sheet name

lrow1 = ws1.Cells(Rows.Count, 1).End(xlUp).Row 'change the "1" to the column # of the beginning of the data set (defult is column A)
lrow2 = ws2.Cells(Rows.Count, 1).End(xlUp).Row + 1 'change the "1" to the column # of the beginning of the data set (defult is column A)

ws1.Range("A2:K" & lrow1).Copy Destination:=ws2.Range("A" & lrow2) ' Change the range to start cell of your data and the end column of your data (defult A2:K endrow of data)
End Sub

Read the comments and update the necessary code to match your data set.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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