ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to combine 2 or excel into 1 excel file(different sheet) (https://www.excelbanter.com/excel-programming/344328-how-combine-2-excel-into-1-excel-file-different-sheet.html)

althonfx

how to combine 2 or excel into 1 excel file(different sheet)
 

hi, i am newbie in excel programming...


can anyone tell me how to combine 2 or excel into 1 excel
file(different sheet)?

example:

i wan combine excel file A and excel file B into excel file C (in
differrent sheet), using marcos.


how should i do??


--
althonfx
------------------------------------------------------------------------
althonfx's Profile: http://www.excelforum.com/member.php...o&userid=28473
View this thread: http://www.excelforum.com/showthread...hreadid=480787


Mike Fogleman

how to combine 2 or excel into 1 excel file(different sheet)
 
Just a guess, but this will copy sheet1 to sheet3 and copy sheet2 to the
next available row in sheet3:

Sub CopySheets()
Dim iLRow As Long
Sheets("Sheet1").UsedRange.Copy Destination:= _
Sheets("Sheet3").Range("A1")
iLRow = Sheets("Sheet3").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("Sheet2").UsedRange.Copy Destination:= _
Sheets("Sheet3").Range("A" & iLRow + 1)
End Sub

Mike F
"althonfx" wrote in
message ...

hi, i am newbie in excel programming...


can anyone tell me how to combine 2 or excel into 1 excel
file(different sheet)?

example:

i wan combine excel file A and excel file B into excel file C (in
differrent sheet), using marcos.


how should i do??


--
althonfx
------------------------------------------------------------------------
althonfx's Profile:
http://www.excelforum.com/member.php...o&userid=28473
View this thread: http://www.excelforum.com/showthread...hreadid=480787





All times are GMT +1. The time now is 12:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com