I have workbook1 and workbook2.
I need to create macro to copy the Column B (Starts from B4 to the end of Column B) in workbook2, sheet 1
into Workbook1, column A, starts from A2
How to write the Macro Code
I have workbook1 and workbook2.
I need to create macro to copy the Column B (Starts from B4 to the end of Column B) in workbook2, sheet 1
into Workbook1, column A, starts from A2
How to write the Macro Code
Hi,
Try this:
Directions for running the routine(s) just supplied![]()
Please Login or Register to view this content.
Copy the code to the clipboard
Press ALT + F11 to open the Visual Basic Editor.
Open a macro-enabled Workbook or save your Workbook As Macro-Enabled
Select “Module” from the Insert menu
Type "Option Explicit" then paste the code under it
With the cursor between Sub and End Sub press F5 (F8 to Single Step)
OR
Press ALT + Q to close the code window.
Press ALT + F8 then double click on the macro name
If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)
You can't do one thing. XLAdept
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin
It said debug with Set w1 = Workbooks("Workbook4").Worksheets("Sheet1")
Did you have the workbooks open??
Is Sheet1 the correct Sheet name? The code works for me???
Oh yeah, it works now. Maybe because i was using the MAC it works well on my PC. thanks
You're welcome!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks