Results 1 to 3 of 3

Loop through worksheets and exclude some

Threaded View

  1. #1
    Registered User
    Join Date
    08-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    16

    Loop through worksheets and exclude some

    How should I improve this code?


    Sub dad()
    Dim i As Long
    Worksheets("All").Select
    For i = 1 To Worksheets.Count
    If Worksheets(i).Name <> "All" Or Worksheets(i).Name <> "Elements" Or Worksheets(i).Name <> "Graphs" Then
    Worksheets("All").Rows(1).Copy Worksheets(i).Range("A1")
    Else
    i = i + 1
    End If
    Next i
    
    End Sub
    Thanks
    Last edited by dasseya1; 09-05-2013 at 10:39 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 10-30-2012, 06:34 PM
  2. Exclude rows from loop
    By inky in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2008, 06:34 AM
  3. For Loop - How to exclude a sheet eveytime this code is ran
    By nickm687 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2007, 06:49 AM
  4. [SOLVED] Exclude specific wks in FOR EACH wks Loop
    By Dean in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-14-2005, 02:25 PM
  5. Exclude some worksheets when using UsrSht function
    By annabel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-06-2005, 10:25 PM

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