+ Reply to Thread
Results 1 to 3 of 3

Macro that can save a workbook multiple times with changes in each one.

  1. #1
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Macro that can save a workbook multiple times with changes in each one.

    I have a macro (that I have attached) that currently does the following:

    1. Copy a cell "A2" in "Sheet1" to "Input"cell "A4" then
    2. Save the entire workbook as is to "C:\Macro" with the naming convention being: (The contents of “A4”.2013) in the "Input" sheet
    3. Then repeat for every cell in Column A that has data.
    So the end result is that I have a workbook saved for every line in column A.

    However, I need to make the following change and I am not sure how to go about it:

    I added some information in Columns C and E of "Sheet1". I need all of the C column data to go to "Input" "C2" and all of the E column data to go to "Input" "E5".

    So for example, in the first workbook copy the "Input sheet should read: "15-14-16" in "A1" and "John" in "C2" and "AZ" in “E5" and the second workbook copy should read: “18-19-21 in “A1” Steven in “C2” and “AZ” in “E5”.

    Does anyone know how to help me with this?
    Thanks a ton
    Attached Files Attached Files
    Last edited by glide2131; 05-21-2013 at 05:02 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro that can save a workbook multiple times with changes in each one.

    Try something like this. Put the code in a standard code module (e.g.; Module1) and not a worksheet's code module.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Re: Macro that can save a workbook multiple times with changes in each one.

    Works perfectly. Thank you very much.

+ 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