Results 1 to 12 of 12

Looping Worksheet Macro - Skip a Sheet

Threaded View

  1. #1
    Registered User
    Join Date
    02-02-2015
    Location
    Brisbane
    MS-Off Ver
    2013
    Posts
    5

    Looping Worksheet Macro - Skip a Sheet

    Hi,
    I have this macro to cycle through all worksheets, retrieve data and paste into the "Test Lookup" sheet, but I want to skip one worksheet (called "Specs").

    Any thoughts on how? Thanks.
    Sub Macro3()
    '
    ' Macro3 Macro
    '
    
    '
     Dim i As Long
     For i = 1 To Worksheets.Count
    
        Sheets(i).Select
        Range("G9:H9").Select
        Range(Selection, Selection.End(xlDown)).Select
        Selection.Copy
        Sheets("Test Lookup").Select
        Range("A65535").Select
        Selection.End(xlUp).Select
        Selection.Offset(1, 0).Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Sheets(i).Select
        ActiveWindow.SmallScroll Down:=-9
        Range("P9").Select
        Range(Selection, Selection.End(xlDown)).Select
        Application.CutCopyMode = False
        Selection.Copy
        Sheets("Test Lookup").Select
        Range("c65535").Select
        Selection.End(xlUp).Select
        Selection.Offset(1, 0).Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Next i
        
        
    End Sub
    Last edited by Leith Ross; 02-02-2015 at 03:04 AM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] can't get macro to skip worksheet if row 2 is blank...
    By fabrecass in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-28-2012, 05:10 AM
  2. [SOLVED] Multiiple Worksheet Loop Macro only Looping on 1 sheet
    By lscarstens in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2012, 02:44 PM
  3. [SOLVED] Event macro to skip worksheet
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2012, 11:42 AM
  4. Replies: 1
    Last Post: 08-18-2012, 06:59 PM
  5. macro to skip delete sheet question
    By excellentexcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-13-2009, 08:40 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