Merging Data

Corleone

Well-known Member
Joined
Feb 2, 2003
Messages
834
Office Version
  1. 365
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:
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,255
Members
448,556
Latest member
peterhess2002

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