Combining information from 2 Spreadsheets into 1

J

japc90

I have a workbook that lists current employees on one spreadsheet and
terminated employees on another. I want to combine all of this
information on one spreadsheet within the same workbook without having
to cut and paste the information to the "All Up" spreadsheet.

Thanks in advance.
 
D

Dave Miller

Try something like this:

Regards,

David Miller

Sub CombineSheets()
Dim NewBk, CurBk, TermBk As Workbook

Set NewBk = ActiveWorkbook
Set CurBk = Workbooks.Open("C:\CurrentEmployees.xls")
Set TermBk = Workbooks.Open("C:\TermEmployees.xls")

CurBk.Sheets(1).UsedRange.Copy
NewBk.Sheets(1).Range("A1").PasteSpecial
TermBk.Sheets(1).UsedRange.Copy
NewBk.Sheets(1).Range("A" & _
NewBk.Sheets(1).Range("A65536").End(xlUp) + 1).PasteSpecial

CurBk.Close
TermBk.Close

Set CurBk = Nothing
Set NewBk = Nothing
Set TermBk = Nothing
End Sub
 
Top