+ Reply to Thread
Results 1 to 20 of 20

Macro runs Slowly

Hybrid View

  1. #1
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,308

    Re: Macro runs Slowly

    Not tested, but this should be very quick...
    Sub InsertRowS1()
        
        With Worksheets("Data Input -Unit Leaders")
            .Activate
            .Unprotect Password:="team"
            .Cells(.Rows.Count, 1).End(xlUp).Offset(2, 0).EntireRow.Copy
            .Cells(.Rows.Count, 1).End(xlUp).Offset(-1, 0).EntireRow.Resize(250).Insert shift:=xlDown
            .Protect Password:="team"
        End With
        
        With Worksheets("Ranking - Unit Leaders")
            .Activate
            .Unprotect Password:="team"
            .Cells(.Rows.Count, 1).End(xlUp).Offset(-2, 0).EntireRow.Copy
            .Cells(.Rows.Count, 1).End(xlUp).Offset(-1, 0).EntireRow.Resize(250).Insert shift:=xlDown
            .Protect Password:="team"
        End With
    
    End Sub

  2. #2
    Forum Contributor
    Join Date
    01-03-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2016,Excel 2013
    Posts
    186

    Re: Macro runs Slowly

    Hi Dangleor

    Thanks for your input but the code you are suggesting are only inserting rows and does not copy forumuals.
    Please refer to my original code, the macro is inserting and copying formulas only. This it does to both my sheets.
    The macro is absolutely fine but i need a code to speed it up.
    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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