+ Reply to Thread
Results 1 to 5 of 5

Macro to file save a file as many files.

Hybrid View

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    3

    Macro to file save a file as many files.

    Hi there,
    I am new to the forum and have no vba training.
    I need a macro for work (using excel 2010) to file save as a "Master File" to create a multiple number of files.
    The file names and path of the new files would be listed in separate cells in adjoining columns in a worksheet in the file containing the macro.
    For info, the "Master File" consists of a number of worksheets and is used to summarise and code credit card transactions and is distributed to about 50 cardholders each month for completion.
    Would it be possible to provide for a name and branch of the file reciepent in seperate cells to be listed alongside the filename and filepath and placed into a specific worksheet and specific cell in each the new files.

    The macro would save me a lot of time each month copying and renaming files.

    Your assistance would be greatly appreciated.

    Thanks
    JOHNDL
    Last edited by JOHNDL; 11-15-2012 at 05:03 AM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro to file save a file as many files.

    attach a sample Master file and a sample file to be created
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    10-29-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to file save a file as many files.

    Hi patel45
    I have attached the sample files.
    They were pruduced at my home in Excel 2003 but I need the Macro to work in Excel 2010 aw work.
    Your assistance is appreciated
    Thanks
    John

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro to file save a file as many files.

    I'm sorry, but I understood nothing

  5. #5
    Registered User
    Join Date
    10-29-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to file save a file as many files.

    The concept is to write the macro in the file named "SAMPLE OF FILE CONTAINING MACRO".
    The macro would save as (or copy) the file named "SAMPLE OF MASTER FILE" whose name and file path would be written directly into the macro.
    The macro would save as (or copy) the file as many times as there are names in column A (Range A2:Alast name)and saved to the file path in column B (Range (B2:B last location).
    The macro would also copy the name in Column C to the cell in Column D ($B$6) and the branch in column E to the cell in column F ($D$6).For example, in the file saved as (or copied) as per columns A (A2) & B (B2) cells B6=Bill Brown and cell D6=Sydney (as per "SAMPLE OF FILE PRODUCED" which the macro would have named "Bill Brown.xlsx" is the same as the "SAMPLE OF MASTER FILE" other than cells B6 and D6 are now populated).

    I'm sorry,I should have included an additional column-column G in the "SAMPLE OF FILE CONTAINING MACRO" file specifying which Worksheet (PARTA) in the saved (or copied) file where the cells referred to in columns D & F are located.

    Does this clarify?

    Thanks
    John

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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