+ Reply to Thread
Results 1 to 4 of 4

Looping VBA code for Goalseeking skipping certain named sheets

  1. #1
    Registered User
    Join Date
    08-20-2018
    Location
    New york
    MS-Off Ver
    2016
    Posts
    21

    Looping VBA code for Goalseeking skipping certain named sheets

    Hi!

    I tried to do something like this a year ago or so but it never quite came out how originally planned it and now its more important that I get it right.

    I have a master sheet with data that references many sheets in the same wb. On each of the many sheets I need one cell to be goalseeked to zero. Right now I have the following few lines of code on each sheet that requires goalseeking:


    [
    Please Login or Register  to view this content.
    This was sufficient for a while but what I need now is a looping code I can activate with a button. One that goes through each sheet in the wb but skips certain named sheets.

    or even better...

    Is it possible that if I had a list of the names of the certain sheets that I wanted the code to run on that if I selected this list of names and ran the code it would only run on those sheets?

    your help is appreciated.

    Thanks,

    G
    Last edited by Pepe Le Mokko; 01-30-2020 at 03:42 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,643

    Re: Looping VBA code for Goalseeking skipping certain named sheets

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I did it for you this time. Please read forum rules. Thanks

  3. #3
    Registered User
    Join Date
    08-20-2018
    Location
    New york
    MS-Off Ver
    2016
    Posts
    21

    Re: Looping VBA code for Goalseeking skipping certain named sheets

    Thanks.

    I haven't been on the forum in a while and I thought I remembered that enclosing code with brackets was the protocol. Read the rules and will know for the future.

  4. #4
    Registered User
    Join Date
    08-20-2018
    Location
    New york
    MS-Off Ver
    2016
    Posts
    21

    Re: Looping VBA code for Goalseeking skipping certain named sheets

    Found an answer to my query here:

    https://www.ozgrid.com/forum/index.p...f-sheet-names/

    Be well,

    -G

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA Code skipping columns while formtting sheets.
    By shiva_raj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-19-2019, 07:40 AM
  2. Expanding code from working on one named sheet to multiple named sheets
    By BryanD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-15-2014, 01:26 PM
  3. [SOLVED] ThisWorkbook code not hiding named sheets
    By neelie777 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-03-2014, 06:11 PM
  4. Looping Mutliple Named Resized Ranges in next empty row below another named range
    By gingumdog in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-19-2014, 08:15 PM
  5. [SOLVED] Looping through named sheets
    By vexel77 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-26-2013, 10:43 AM
  6. [SOLVED] Goalseeking, help with percentage
    By Buster^ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2013, 05:50 PM
  7. [SOLVED] Looping through sheets to perform code
    By sambuka in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-30-2012, 03:25 PM

Tags for this Thread

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