Results 1 to 4 of 4

Thread: Quick Loop

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2013
    Posts
    44

    Quick Loop

    Hi

    Can anyone turn this macro into a loop

    Needs to Blank out every 16th Cell in Col V starting V21 to V2200



    Code:
    Sub Macro50()
    '
    ' Macro50 Macro
    
    
    
    
        
        Range("V21,V37,V53,V69,V85,V101,V117,V133,V149,V165,V181,V197,V213,V229,V245").Select
    
        Range("V389").Activate
        Selection.ClearContents
        
        Sheets("Race").Select
        Sheets("Race").Select
        Range("W1:Y1").Select
        Application.CutCopyMode = False
        
    
      
    End Sub

    Cheers and much Kudos

  2. #2
    PowerPoster
    Join Date
    Oct 2008
    Location
    Midwest Region, United States
    Posts
    3,574

    Re: Quick Loop

    something like:

    Code:
    Sub blank16()
        Dim i As Integer
        Dim ws As Worksheet
        
        Set ws = ActiveSheet
        
        For i = 21 To 2200 Step 16
            ws.Range("v" & i).ClearContents
        Next i
    End Sub
    and you'd probably want this before the For loop:

    Code:
    Application.ScreenUpdating = False

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2013
    Posts
    44

    Re: Quick Loop

    Thanks vbfbryce

    Legend perfect exactly as i needed

    If i was an employer I'd give you a Job

    Respect

    All the best my man

    Mike
    Last edited by keen2xl; Dec 14th, 2013 at 08:37 PM.

  4. #4
    PowerPoster
    Join Date
    Oct 2008
    Location
    Midwest Region, United States
    Posts
    3,574

    Re: Quick Loop

    Any time!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width