I'd like to be able to place my cursor in a cell and run a macro that selects
that cell, plus 2 additional cells to the right (in the same row) and move
all three cells up one row. (basically a cut and paste).
Easily possible???
Greg Wilson - 16 Feb 2007 03:32 GMT
Below are two options. The first only transfers values (ignores formatting)
and clears the contents of the source range. The second option does a cut and
paste (includes formatting).
Option 1:-
Sub XXX()
With ActiveCell.Resize(1, 3)
.Offset(-1).Value = .Value
.ClearContents
End With
End Sub
Option 2:-
Sub YYY()
With ActiveCell
.Resize(1, 3).Cut .Offset(-1)
End With
End Sub
Regards,
Greg