ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy row from one workbook to another (https://www.excelbanter.com/excel-programming/420637-copy-row-one-workbook-another.html)

C Holmes

Copy row from one workbook to another
 
Hello,

I need to copy rows 1 - 4 from one workbook to another workbook. I wouldn't
think it would be that difficult, but I can't figure it out. Appreciate any
help. I'm using Excel 2003.

Thanks.

Eduardo

Copy row from one workbook to another
 
Hi,
try
Sub Macro1()
'
' Macro1 Macro
'

'
Sheets("Sheet2").Select
Rows("1:4").Select
Selection.Copy
Sheets("Sheet1").Select
ActiveSheet.Paste
End Sub


"C Holmes" wrote:

Hello,

I need to copy rows 1 - 4 from one workbook to another workbook. I wouldn't
think it would be that difficult, but I can't figure it out. Appreciate any
help. I'm using Excel 2003.

Thanks.


JLGWhiz

Copy row from one workbook to another
 
You can do that manually by selecting the range to copy, then EditCopy
---Activate the other workbook, select the anchor cell, then EditPaste.

For VBA:

Sub cpyRw1_4()
Set wb1 = ActiveWorkbook.ActiveSheet
Set wb2 = Workbooks(2).Sheets(1)
wb1.Rows("1:4").Copy wb2.Range("A1")
End Sub




Sub
"C Holmes" wrote:

Hello,

I need to copy rows 1 - 4 from one workbook to another workbook. I wouldn't
think it would be that difficult, but I can't figure it out. Appreciate any
help. I'm using Excel 2003.

Thanks.


C Holmes

Copy row from one workbook to another
 
Thanks everyone, got it working!

"C Holmes" wrote:

Hello,

I need to copy rows 1 - 4 from one workbook to another workbook. I wouldn't
think it would be that difficult, but I can't figure it out. Appreciate any
help. I'm using Excel 2003.

Thanks.



All times are GMT +1. The time now is 09:58 AM.

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