+ Reply to Thread
Results 1 to 4 of 4

Copying data from one workbook to new workbooks and saving them with filenames

Hybrid View

  1. #1
    Registered User
    Join Date
    04-19-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Copying data from one workbook to new workbooks and saving them with filenames

    Hi,

    I am new to Macros and was trying to generate one.
    Tasks: 1) Source data is in Temp_List.xlsm. I need to copy the data in cells A2, B2, C2 of Temp_List.xlsm and paste it in I24:Q25, D24:F25 and I22:Q23 respectively of Pointer-A-DWG1.xlsx file.
    2) Then save this above file with filename given in cell D2 of Temp_List.xlsm file at particular location (For example - C:\Documents and Settings\vinbill5\Desktop\Pointer_Dwgs\Delivery_Pointer_Dwgs)
    3) Continue similarly to copy data in cells A3, B3, C3 of Temp_List.xlsm and paste it in I24:Q25, D24:F25 and I22:Q23 respectively of previously saved file or Pointer-A-DWG1.xlsx original file.
    4) Save this second file with filename given in cell D3 of Temp_List.xlsm file at particular location (For example - C:\Documents and Settings\vinbill5\Desktop\Pointer_Dwgs\Delivery_Pointer_Dwgs)
    5) Continue creating new excel workbooks till there is data in rows of column A:A. In the above sample file of Temp_List.xlsm, there are 4 rows having data and hence 4 excel files would be created with proper names.
    Image.JPG
    I tried creating macro but, each time, it creates file with the same values in 2nd row. Evenif I change the values in 2nd row, it replaces them with the values that I had provided while creating the macro.
    Please help me with the above tasks, I need to create almost 2000 files every day and wish to automate this task.

    Thanks,
    vinbill5
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copying data from one workbook to new workbooks and saving them with filenames

    A few questions -

    Will the pointer file be open at the time of macro execution or should it be opened by the macro?

    Also, should this file be saved-as with the new name (File-> Save As) ?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    04-19-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Copying data from one workbook to new workbooks and saving them with filenames

    The pointer file should be opened by macro.
    After filling the data, this file should be saved as with new name (File-> Save As) and then closed. So that at the end of the Macro only the Temp_List.xlsm file would remain open.

    Thanks!

  4. #4
    Registered User
    Join Date
    04-19-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Copying data from one workbook to new workbooks and saving them with filenames

    Hi arlu1201,

    Were you able to create the macro? Your help will help me to save a lot of time as I need to fill such data in excel files (around 2000 excel files daily).

    Thanks in advance!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1