Help tidy up this VBA Code please
Prep for a pre-employment Excel test with Job Test Prep
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Help tidy up this VBA Code please

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    England
    Posts
    44
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Rows(RowOffSet2 - 1).Select
    FillRows = CStr(RowOffSet2 - 1) & ":" & CStr(RowOffSet2 + 2)
    Selection.AutoFill Destination:=Rows(FillRows), Type:=xlFillDefault

    Any thoughts would be appreciated.

    Thanks,
    Alan.

  2. #2
    MrExcel MVP Damon Ostrander's Avatar
    Join Date
    Feb 2002
    Location
    Denver, Colorado USA
    Posts
    4,240
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Alan,

    I believe the following should accomplish the same thing more efficiently:

    With Rows(RowOffSet2-1)
    .AutoFill Destination:=Range(.Cells,Rows(RowOffSet2+2)), Type:=xlFillDefault
    End With


    Keep Excelling.

    Damon

    VBAexpert Excel Consulting
    LinkedIn Profile http://www.linkedin.com/pub/damon-ostrander/7/79/a93
    AllExperts Profile http://www.allexperts.com/ep/1059-30...-Ostrander.htm

  3. #3
    New Member
    Join Date
    Apr 2002
    Location
    England
    Posts
    44
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    yes, oh yes, much better. Thanks for that.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com