anilg0001
06-17-2013, 10:31 PM
if my Q&i range has value then i need to copy Q&i to T&i value and insert a blank row below the q&i row then paste the copied value to newly inserted row M&i
i wrote this but shows error
any one help
Sub main1()
Dim i As Integer
For i = 3 To 15
Range("Q" & i).Select
If Range("Q" & i).Value <> "" Then
'ActiveCell.Offset(0, 4).Copy
ActiveCell.Offset(1, 0).EntireRow.Insert
ActiveCell.Offset(0, 4).Copy
Range("M" & i + 1).Select
active cell.value=""
'Range.Resize(1, 4).Copy 'Destination:=Worksheets("Master File").Range("M" & .Row + 1)
End If
Next i
i = i + 1
End Sub
i wrote this but shows error
any one help
Sub main1()
Dim i As Integer
For i = 3 To 15
Range("Q" & i).Select
If Range("Q" & i).Value <> "" Then
'ActiveCell.Offset(0, 4).Copy
ActiveCell.Offset(1, 0).EntireRow.Insert
ActiveCell.Offset(0, 4).Copy
Range("M" & i + 1).Select
active cell.value=""
'Range.Resize(1, 4).Copy 'Destination:=Worksheets("Master File").Range("M" & .Row + 1)
End If
Next i
i = i + 1
End Sub