Copy certain cells to another workbook (macro)

Tubig

Board Regular
Joined
Feb 20, 2003
Messages
66
I've tried searching for a few hours on this but I couldn't find exactly what I was looking for.

Is there way to create a macro to copy a few cells from one workbook and paste them into another at the bottom of the next open cell?

I found this code to get to the bottom of a page but that's as far as I got. :eek:

Sub FindFirstCellNextRow()
Dim x As Integer
x = ActiveSheet.UsedRange.Rows.Count
ActiveCell.SpecialCells(xlLastCell).Select
ActiveCell.EntireRow.Cells(1, 1).Offset(1, 0).Activate
End Sub

Any help would be greatly appreciated! :biggrin:
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Sounds perfectly possible.:)

What cells do you actually want to copy and where do you want to copy them to?
 
Upvote 0
Sounds perfectly possible.:)


What cells do you actually want to copy and where do you want to copy them to?

Thanks for the quick reply!

I want to copy row A1 from workbook "Purchase Order.xls on Sheet1" to workbook "Construction Schedule on Sheet2". I want it to copy that row to the next open row on that sheet.

I hope that makes sense. :oops:
 
Upvote 0
Well that could be as simple as this.:)
Code:
Workbooks("Purchase Order.xls").Sheets("Sheet1").Rows(1).Copy Workbooks("Construction Schedule.xls").Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
 
Upvote 0
Well that could be as simple as this.:)
Code:
Workbooks("Purchase Order.xls").Sheets("Sheet1").Rows(1).Copy Workbooks("Construction Schedule.xls").Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)

Thanks guys but i can't get it to work right.

I don't know how to enter the path correctly. This is what I have so far:

Sub FindFirstCellNextRow()
Workbooks("P:\1 - 2006 MASTERS.xls").Sheets("JOB SUMMARY").Rows(3).Copy Workbooks("Q:\CONSTRUCTION SCHEDULE\Book1.xls").Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Offset(1)

Dim x As Integer
x = ActiveSheet.UsedRange.Rows.Count
ActiveCell.SpecialCells(xlLastCell).Select
ActiveCell.EntireRow.Cells(1, 1).Offset(1, 0).Activate
End Sub

I don't know codes very well. Any help? :oops:
 
Upvote 0
Why did you include the paths?

The code I posted assumed both workbooks were open.
 
Upvote 0
Why did you include the paths?

The code I posted assumed both workbooks were open.

ohhhh. OK. I'll give that another try.

Thanks again for all of your help! :biggrin:
 
Upvote 0

Forum statistics

Threads
1,214,858
Messages
6,121,956
Members
449,057
Latest member
FreeCricketId

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