+ Reply to Thread
Results 1 to 14 of 14

Mirroring Worksheets from a Master Template

  1. #1
    Registered User
    Join Date
    08-10-2009
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Mirroring Worksheets from a Master Template

    Having done some research I think I can make it more clear what I hope to do, please lend some advice, all is welcome

    I have a workbook that will have multiple sheets that I wish to have the exact same formatting, however, the data on each sheet may vary.

    I want to be able to use a "Master Sheet" to make all formatting (ie. cell size, text alignment, font size/style) changes and have the other sheets automatically update.

    I do not want this to affect or interfere with the data.


    The reason is that some workbooks may end up with a large amount of worksheets and when I want to make a change to cell sizing or alignment I don't want to have to go through all of them to do this.

    Again, TIA
    Last edited by bbbfalcs; 08-14-2009 at 12:01 PM. Reason: additional info

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Too long for a title, please help if you can!!!

    Title suggestion:

    Mirroring Worksheets from a Master Template
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Too long for a title, please help if you can!!!

    We'll wait while you change the title ...
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    08-10-2009
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Mirroring Worksheets from a Master Template

    Thanks fellas...

    Still trying to find the right solution to this one. Any help is appreciated!

  5. #5
    Registered User
    Join Date
    08-10-2009
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Mirroring Worksheets from a Master Template

    Anyone?


    Bueller?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Mirroring Worksheets from a Master Template

    First of all, that was VERY funny! Thanks for making my day.

    I didn't have a suggestion, but you made me laugh so I thought about it and the only thing I can think of is that if you select multiple sheets at once, called GROUPING, and then make changes to one sheet, the changes you are making are being applied to all the sheets. So I thought maybe we could fake this.

    So, on your master sheet (let's presume it's Sheet1), right-click the sheet tab and select VIEW CODE and put in this code:
    Please Login or Register  to view this content.
    Edit the array to list ALL the sheets that you want to be grouped this way, be sure to include the template (Sheet1?) in the list. Now as you make changes, it is updating the other sheets, too.

    Then, when you switch to another sheet, the DEACTIVATE macro will ungroup the sheets and you will be back in individual sheet mode.

    Hope this helps.

  7. #7
    Registered User
    Join Date
    08-10-2009
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Red face Re: Mirroring Worksheets from a Master Template

    That sounds like were on the right track however I have to admit that you are dealing with someone completely unfamiliar with this VBA stuff.

    I have been doing some reading the past day or two but I am certainly not educated on it.


    So... after I put in that code and modified the array to meet my needs I tried to save, assuming that should be my next step.


    When I tried to save a dialog box popped up with the following message:

    "The following features cannot be save in macro-free workbooks:

    VB projects

    To save a file with these features, Click NO, and then choose a macro-enabled file type from the file type list

    To continue saving as a macro-free workbook click Yes."




    I fear this indicates that I have not set up my workbook appropriately for this kind of action but I have no idea how to remedy this one either! ha

    please help?
    (this project is becoming time-sensitive for me by now)

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Mirroring Worksheets from a Master Template

    You're using Excel 2007. You can't use macros in a file saved as *.xlsx, you will have to save it as *.xlsm which proves for certain you meant to have macros. One of Excel 2007's "security" features.

  9. #9
    Registered User
    Join Date
    08-10-2009
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Mirroring Worksheets from a Master Template

    Beautiful... That explains why it also popped up the Save As window

    I might be getting somewhere now

  10. #10
    Registered User
    Join Date
    08-10-2009
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Mirroring Worksheets from a Master Template

    JBeaucaire,

    Your method works for me. It isn't exactly what I had in mind but it certainly seems to work well.

    One thing, when I click back to the "template" page after clicking through the other sheets to confirm the changes were successful I get a pop up message that says:

    "Run-time error '9':

    Subscript out of range"

    and my options are End, Debug, Help


    When I click Debug it takes me to the code and has this line highlighted in yellow:

    "Sheets(Array("Sheet Format Template", "Sheet2", "Sheet1")).Select"




    Any insight into this? It does not seem to be affecting anything but it certainly would be annoying if I have to clear it every time I click the worksheet that is being used as the template!

    Thanks again

  11. #11
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Mirroring Worksheets from a Master Template

    That didn't happen to me, but I'll be happy to glance at your sheet.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.

  12. #12
    Registered User
    Join Date
    08-10-2009
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Mirroring Worksheets from a Master Template

    Got the pop up message to stop.

    I had deleted "Sheet1" and left it in the code. Once I deleted it from the code the pop up stopped.

    Thank you for offering your help though, and especially for getting me this far!



    I am still fairly surprised that there isn't a efficient way to have multiple worksheets draw their format and data positioning from a "master" worksheet. I have put together a combination of methods to do what I need but it sure would be nice to have it programmed to be automatic!!


    I am attaching a sample spreadsheet for reference. The ticket is that I want to be able to modify things like cell size, data positioning, and arrangement on the "Sheet Format Template" worksheet and have these changes automatically reflected on "Sheet2", WITHOUT having any impact on the "data" on each worksheet.
    Attached Files Attached Files
    Last edited by bbbfalcs; 08-12-2009 at 01:47 PM.

  13. #13
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Mirroring Worksheets from a Master Template

    Glad I could offer some help!

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)

  14. #14
    Registered User
    Join Date
    11-09-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Mirroring Worksheets from a Master Template

    Can a wild card be used for the Sheets So that all sheets named T1 T2 T3 could be done by using a T* command in the macro?

+ 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