Thread: End Copy Macro
View Single Post
 
Old 09-29-2017, 06:16 AM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Assuming you don't have formulas forcing cells to display as blanks, replace this
Code:
Range("A9:J10000").Select
Selection.Copy
with
Code:
For i = 9 To 10001
    If Cells(i, "A") = "" Then
        If Application.CountA(Range("A" & i & ":J" & i)) = 0 Then
            Exit For
        End If
    End If
Next i
Range("A9:J" & i - 1).Copy
Reply With Quote