Hi
I am a vba newb. What I tried to do is copying the data from one cell to another.
Sub DataManipulate()
Row = 13 '
Do
Range(Cells(Row, 4), Selection.End(xlToRight)).Select
Selection.Cut 'Select these cells and cut
If Range(Selection.End(xlUp)).Offset(-1, 0).Value = "" Then
Range(Selection.End(xlUp)).Offset(-1, 0).Select
ActiveSheet.Paste
Else
Range(Selection.End(xlUp)).Offset(-1, 0).Selection.End(xlToRight).Offset(0, 1).Select
ActiveSheet.Paste
End If 'Locate to the cell and paste
Row = Row + 1
Loop Until Cells(Row, 1).Value = ""
End Sub
But the application-defined error popped up.
Please any insights are welcome!
Thanks
I am a vba newb. What I tried to do is copying the data from one cell to another.
Sub DataManipulate()
Row = 13 '
Do
Range(Cells(Row, 4), Selection.End(xlToRight)).Select
Selection.Cut 'Select these cells and cut
If Range(Selection.End(xlUp)).Offset(-1, 0).Value = "" Then
Range(Selection.End(xlUp)).Offset(-1, 0).Select
ActiveSheet.Paste
Else
Range(Selection.End(xlUp)).Offset(-1, 0).Selection.End(xlToRight).Offset(0, 1).Select
ActiveSheet.Paste
End If 'Locate to the cell and paste
Row = Row + 1
Loop Until Cells(Row, 1).Value = ""
End Sub
But the application-defined error popped up.
Please any insights are welcome!
Thanks