Hi, anilg0001,
if you want to get into serious programming get away from both using ActiveCell as well as doing unnecessary Selects.
What do you want to get from the second loop with the variable i as it is not used in your code?
Sub original1()
Dim k As Integer
Dim i As Integer
For k = 3 To 20
With Cells(k, "Q")
If .Value <> "" Then
.Offset(1, 0).EntireRow.Insert
For i = 1 To 10
.Resize(1, 4).Copy Destination:=Worksheets("Master File").Range("M" & .Row + 1)
' .Resize(1, 4).Select
'.Resize(1, 4).Value = ""
'ActiveCell.Value = ""
'.Resize(1, 4).Delete Shift:=xlToLeft
' Selection.Copy
.Resize(1, 4).Delete shift:=xlToLeft
' If .Value = "" Then
' End If
Next i
Else
Exit Sub
End If
End With
Next k
End Sub
Ciao,
Holger
Bookmarks