Hi experts,
i want to copy all cells that have data in column C on a sheet names record from the opened workbook calls old
to column M in an active workbook with a sheet calls sheet2
how can i do it with VBA code?
Hi experts,
i want to copy all cells that have data in column C on a sheet names record from the opened workbook calls old
to column M in an active workbook with a sheet calls sheet2
how can i do it with VBA code?
Which workbook would you like to insert the code into?
in the workbook names "OLD".
I'm sorry are you copying information from one workbook to another
or
copying information from one worksheet within one workbook to another worksheet within the same workbook?
Thanks!
copying information from one workbook to another.
from workbook names OLD to a new opened active workbook
Hello there,
If I understand you right the below code should work for you. It creates a new workbook and copies column C from the old workbook sheet record to column M of the new workbook sheet2
To use this code:Please Login or Register to view this content.
1. Open the old workbook
2. Press Alt+F8 to bring up the macro window
3. Clear the macro name field
4. Type CreateNewWB in the macro name field and then select the Create option
5. In between the Sub CreateNewWB() and End Sub copy and paste the above code I supplied you
6. Take a little time to read through the comments that appear in green. They will help you understand the code.
7. Exit out of Visual Basic
To run the code
1. Press Alt+F8
2. Select the CreateNewWB macro and then select run
Last edited by rvasquez; 09-12-2012 at 03:08 PM.
THANKS! it works great! the comments are very helpful !
No problem glad to help!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks