Macro to copy/paste data from within XL files

Tahas

Board Regular
Joined
Sep 10, 2008
Messages
166
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p> </o:p>
I need help in macro to copy/paste data from one Excel file to other. My file has two sheets Data and Report. Here is the requirement;

I want to run a macro to copy the text from Data sheet (Cell D35) and paste it under the next blank cell of Report sheet (Column E)

<o:p></o:p>

Thanks for help in advance
Taha
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Code:
Sub copdata()

lastrow = Worksheets("Report").Range("E65536").End(xlUp).Row + 1
Cells(lastrow, "E").Value = Worksheets("Data").Range("D35").Value

End Sub
 
Upvote 0
Hello Shyrath,

Thanks for your help. Just another question please. How can I add the path and file name in your code. Here is my path and file name:
Active wbpath = "O:\Admin\Cheque Pick Up Forms - Reports\"
Active wb = Sheets("Cheque Pick up Report").Range("F3").Value & ".xls"
 
Upvote 0

Forum statistics

Threads
1,214,829
Messages
6,121,826
Members
449,051
Latest member
excelquestion515

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