How do I do this please?
So I press Ctrl & C, the cell copies and then shifts two to the left - also when i press CTRL & V, it pastes then shifts one to the right.
Thanks.
How do I do this please?
So I press Ctrl & C, the cell copies and then shifts two to the left - also when i press CTRL & V, it pastes then shifts one to the right.
Thanks.
Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum
[vba]
Sub CopyAndMove()
With ActiveCell
.Copy
If .Column >= 3 Then
.Offset(0, -2).Select
ElseIf .Column >= 2 Then
.Offset(0, -1).Select
End If
End With
End Sub
Sub PasteAndMove()
With ActiveSheet
.Paste
If ActiveCell.Column <= .Columns.Count - 1 Then
ActiveCell.Offset(0, 1).Select
End If
Application.CutCopyMode = False
End With
End Sub
Sub SetKeys()
Application.OnKey "^c", "CopyAndMove"
Application.OnKey "^v", "PasteAndMove"
End Sub
[/vba]
The first two do the work, the third setsup the control keys.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Marvellous,
Thanks Mr X
Have a profound problem? Need a ridiculous solution? Post a question in Babydum's forum
Don't forget to reset the keys when done!
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber