In VBA are you able to carry out a copy and paste straight after a cut and paste. I ask because If statement within a for loop that needs to cut a row of data and then copy the row directly underneath. When I run the code it performs that cut but never the copy. I looked into this online and the only thing I could come up with is clearing the clipboard. Sadly this not help :(.
Here is my code:
im r As Range
Dim i As Long, i2 As Long, i4 As Long
i = 2
i2 = 15
i3 = 70
i4 = 3
For Each r In ActiveSheet.UsedRange
v = r.Value
If InStr(v, "ION") > 0 And InStr(v, "Dog") > 0 Then
Range(Cells(r.Row, r.Column), Cells(r.Row, r.Column + 2)).Cut
Range(Cells(i, 8), Cells(i, 10)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range(Cells(r.Row + 1, r.Column), Cells(r.Row + 1, r.Column + 2)).Copy
Range(Cells(i4, 8), Cells(i4, 10)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
i = i + 2
i4 = i4 + 2
There is then more code using elseif's to search for other words but the code above is the code in question.
To reiterate, the cut/paste works. the copy/paste does not.
Thanks.