+ Reply to Thread
Results 1 to 5 of 5

How to change a template that is in many files

  1. #1
    Forum Contributor
    Join Date
    08-25-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    125

    How to change a template that is in many files

    Hi

    I have made a spreadsheet template that I "save as" many times with different names. ie:Sales - Jan , Sales - Feb , etc

    If I change a cell format in the template , is there a way I can do the same to all the other files without opening each file individually and changing it.

    Please advise

  2. #2
    Forum Contributor
    Join Date
    10-18-2012
    Location
    Telford, England
    MS-Off Ver
    Excel 2010 (2003)
    Posts
    294

    Re: How to change a template that is in many files

    I think the change event detects change in value or you could automate from there.
    Do th etemplates consist of only one used sheet (ignore sheet2, sheet 3 if unused)? If so there's a trick that would work:

    Create the template document with 12 identical sheets named for the month. Have a macro that does save as for exch tab with its month name.
    Select all 12 tabs at once. Make your (format or other) change. It will happen in all 12 tabs.
    Select one tab - otherwise you'll get in a mess.
    Run the macro

  3. #3
    Forum Contributor
    Join Date
    08-25-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: How to change a template that is in many files

    Hi Brynbaker
    Thanks for the response.
    The template I have used IS connected to other sheets in its workbook.
    The actual use of the template is a furniture costing spreadsheet - Sorry not realy sales months.
    I have in excess of 400 files with the same template. I now need to add/change cells in each costing as I want to make changes to the overall look/function of the costing spreadsheet.
    I dont really feel like opening each file individualy to do this.
    So I think that what you suggest - making a template document with identical sheets - will take me just as long to do as individualy opening each file.
    Maybe you have another suggestion.
    Also Im not at all familiar with macro , so if it does involve that I would need baby steps.

    Thanking you in anticipation.

    Onesock

  4. #4
    Forum Contributor
    Join Date
    10-18-2012
    Location
    Telford, England
    MS-Off Ver
    Excel 2010 (2003)
    Posts
    294

    Re: How to change a template that is in many files

    I see. It doesn't matter what you are counting the principlas - and the problems - are the same. Your words imply that all the files are essntially the same structure - formulas, columns, formats, headings. Of course the filenames, probably numbers of rows, and the values are different.

    I predict you are going to become familiar with macros, and fear not it is less painful than a visit to the dentist; you just start withwhat you know and go from there. I will assume that "not at all familiar with macro" means almost nothing, but that you have use dthe VBA editor (or can readily research that. There's lots of guides on the next including this forum.

    Rule 1. Try NOT to write a macro, get somthing close to what you need, then write a bit to fix it.
    There are two excellent approaches instead.
    a) record anything you can. In your case, you could open the template file, start the mavro recorder, make all the changes, stop the macro recorder, edit the result.
    b) stand on taller shoulders by finding code (imitation is the sincerest form of flattery).

    Then you study what you have until you understand it - before you fix it. The code from a) is relatively easy; after all it does what you did. Excel will helpfully have doi eit in an odd way and possibly done additional stuff you don't need. b) is harder - someone else who knows a lot that you don't know (but not necessaril less tha n you, just a different set) has coded something perhaps with great elegance. Understanding takes a little time. But perhaps less than editing 400 files by hand.

    Finally you fix. For instance in b) for can find a way to loop through all the files you want to change. e.g. my own post http://www.excelforum.com/excel-prog...04#post2982104 at Last edited by brynbaker; 10-25-2012 at 05:41 AM.

    Inside the processfile put the fixed code from a). Test, run, relax, award yourself the CDM. It's fun. There is a learning curve but it is worth it. Have a go, an dupdate with specific issues as you progress.

  5. #5
    Forum Contributor
    Join Date
    08-25-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: How to change a template that is in many files

    Hi Brynbaker

    Thanks for the advise . Ill will do some studying up , and when I am a bit more familiar with macros/vba , Ill will try again.

    Regards

    Onesock

+ 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