PeopleSoft Adoption Made Smooth & Simple!
On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool. Claim Your Free WalkMe Account Now
Sub AppendData() Dim wbkMaster As Workbook Dim shtMaster As Worksheet Dim rngMaster As Range Dim wbkData As Workbook Dim shtData As Worksheet Dim rngData As Range ' change path and file name to suit Set wbkMaster = Workbooks.Open("D:\temp\testmaster.xls") Set shtMaster = wbkMaster.Worksheets(1) ' change path and file name to suit Set wbkData = Workbooks.Open("D:\temp\test1.xls") Set shtData = wbkData.Worksheets(1) ' get end of master Set rngMaster = shtMaster.Range("A65536").End(xlUp) ' Change as per your need Set rngData = shtData.Range("A11:A" & shtData.Range("A11").End(xlDown).Row) ' copy data across rngData.Copy rngMaster MsgBox "Appended " & rngData.Rows.Count & " rows of data to Master data", vbInformation ' simply close data wbkData.Close False ' save and close master wbkMaster.Close True ' release objects Set rngData = Nothing Set shtData = Nothing Set wbkData = Nothing Set rngMaster = Nothing Set shtMaster = Nothing Set wbkMaster = Nothing End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Excel VBA - set conditional format rules precedence||3||77|
|Excel Macro update each line based on another worksheet||2||49|
|ActiveX component can't create object VBA how to fix it||6||57|
|VBA error subscript out of range help||5||25|
Join the community of 500,000 technology professionals and ask your questions.