Merging Data

Corleone

Well-known Member
Joined
Feb 2, 2003
Messages
714
Im not sure whether this is the correct term for what im trying to do
I have a large spreadsheet and i need to consolidate the data contained within 2 of the worksheets so that they drop into another sheet (ie the 2 sets of data sitting underneath each other)
For example sheet1 has 1000 rows of data which is copied and pasted in from a csv file (however, the amount of data rows in the csv file changes from week to week)
Sheet 2 has 250 rows of data all columns/headers etc are the same but this is inputted manually.

I want sheet 3 to automatically update so that it takes the data in sheet 1 and sheet 2 - so i have 1250 rows of data - this in itself is not a problem.

However i want sheet 3 to recognise when the rows of data increase or decrease in sheet 1 or 2
so next week for example when i clear the data in Sheets 1 and 2 and paste in the updated data - there could be 1300 rows in sheet 1 and 300 rows in sheet 2
i then want sheet 3 to contain those 1600 rows of data. - I always want the manually inputted rows of data in sheet 2 to jump directly below the newly copied in data from



I suspect i haven't explained myself very well:ROFLMAO:
 

Some videos you may like

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

mumps

Well-known Member
Joined
Apr 11, 2012
Messages
10,108
Try:
VBA Code:
Sub CopyData()
    Application.ScreenUpdating = False
    Dim desWS As Worksheet
    Set desWS = Sheets("Sheet3")
    desWS.UsedRange.ClearContents
    With desWS
        Sheets("Sheet1").UsedRange.Copy .Cells(.Rows.Count, "A").End(xlUp).Offset(1)
        Sheets("Sheet2").UsedRange.Copy .Cells(.Rows.Count, "A").End(xlUp).Offset(1)
    End With
    Application.ScreenUpdating = True
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,122,472
Messages
5,596,353
Members
414,060
Latest member
hermanseck

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