+ Reply to Thread
Results 1 to 3 of 3

Skip array element if non-existent

  1. #1
    Registered User
    Join Date
    03-17-2011
    Location
    Guelph, Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    63

    Red face Skip array element if non-existent

    The following code requires an adjustment to accomodate new situation.

    The Sheet called "INPUT" exists only on 2 of the 16 Templates I work with.
    There is potential of more sheets being added, over time to only some of the w/books.
    There are many more sheets in the w/books that this macro is not to work on.

    Therefore, require an adjustment to this macro that will give me the flexibility to process all the 'standard' sheets, AND will also process the procedure for other specified sheets (names), without erring out.

    What would be the most efficient and most flexible way to accomplish this?

    Please Login or Register  to view this content.
    Last edited by BEEJAY; 12-14-2011 at 08:45 AM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Skip array element if non-existant

    hi Beejay, it can be done this way:

    Please Login or Register  to view this content.
    mySheetNames array defines sheet names the code would process

  3. #3
    Registered User
    Join Date
    03-17-2011
    Location
    Guelph, Ontario, Canada
    MS-Off Ver
    Excel 2003
    Posts
    63

    Re: Skip array element if non-existant

    Hi watersev:

    Works exactly as wanted. Thanks 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