+ Reply to Thread
Results 1 to 6 of 6

Run a macro across all but 3 specific worksheets

  1. #1
    Registered User
    Join Date
    12-06-2012
    Location
    US
    MS-Off Ver
    Excel 2011
    Posts
    4

    Run a macro across all but 3 specific worksheets

    I have a Workbook with a variable number of Worksheets (anywhere between 5 and 100 different sheets). The Worksheets to which I apply the macro are largely identical in structure. I would like to run the following macro against all but 3 specific Worksheets. The 3 Worksheets are constant and will always have the same names, "Global Inputs", "Summary" and "Tie-In Worksheet".

    The code below was not my creation but I copied and adapted it for my use and it works well, albeit for a single active Worksheet.

    Please Login or Register  to view this content.
    I will be very grateful for any suggestions. I am glad to send a sample Workbook if that would help.

    Thanks,
    Dino
    Last edited by dronofrio; 12-06-2012 at 04:55 PM.

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    2007
    Posts
    3,427

    Re: Run a macro across all but 3 specific worksheets

    Hi Dino,

    Welcome to the forum!!

    See how this goes:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Registered User
    Join Date
    12-06-2012
    Location
    US
    MS-Off Ver
    Excel 2011
    Posts
    4

    Re: Run a macro across all but 3 specific worksheets

    Hi Robert! Thanks for your welcome and your assistance! Your tweak almost works, it certainly goes further than anything I've attempted. I get an error code when it runs. I imagine it will take you all of 1 minute to spot the problem so I am sending you a sample Worksheet to which I am applying the macro. Using this you'll see where I am stuck.

    I am very grateful for your help!

    With kind regards,
    Dino09.30.12_Group_DO_sample.xls

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    2007
    Posts
    3,427

    Re: Run a macro across all but 3 specific worksheets

    Hi Dino,

    Try this where the ranges are cleared just before the code is re-run for each tab:

    Please Login or Register  to view this content.
    Regards,

    Robert

  5. #5
    Registered User
    Join Date
    12-06-2012
    Location
    US
    MS-Off Ver
    Excel 2011
    Posts
    4

    Re: Run a macro across all but 3 specific worksheets

    Hi Robert,

    You are a star...that is perfect!

    Thanks!!!
    Dino

  6. #6
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    2007
    Posts
    3,427

    Re: Run a macro across all but 3 specific worksheets

    Thanks for the feedback and you're welcome

+ 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