+ Reply to Thread
Results 1 to 5 of 5

Loop Through Selected Sheets

  1. #1
    Registered User
    Join Date
    12-30-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    36

    Loop Through Selected Sheets

    I know this should be a simple solution available online somewhere, but I can't seem to find it. How does one loop through only selected worksheets in a workbook? For example, I want to add a header to only the worksheets that have been selected.

    Thanks.

  2. #2
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,122

    Re: Loop Through Selected Sheets

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-30-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Loop Through Selected Sheets

    Thanks, but I meant it loops through the sheets that I have already grouped together without any inputs. E.g. I have 20 sheets, and I select (or group) Sheet1, Sheet17, and Sheet19. I want to loop through those selected sheets. I have seen something like

    Please Login or Register  to view this content.
    but do not recall having that work.

  4. #4
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,407

    Re: Loop Through Selected Sheets

    Here's how to do it :

    Please Login or Register  to view this content.
    GC Excel - My blog

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  5. #5
    Registered User
    Join Date
    12-30-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Loop Through Selected Sheets

    Exactly. Thanks.

+ 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. Loop Through Selected Sheets
    By bsamuels in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2013, 03:07 PM
  2. [SOLVED] Merging selected sheets with selected columns into another sheet
    By harry_1805 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2013, 01:51 PM
  3. Replies: 6
    Last Post: 03-29-2006, 07:50 AM
  4. [SOLVED] How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook?
    By Dmitry in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-29-2006, 07:50 AM
  5. Replies: 6
    Last Post: 03-29-2006, 07:50 AM

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