Ahmad Jamal


Hi

This is ahmad, My question is "How can i move one column to the right "

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 6/2/2007 by Administrator
'

'
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
Selection.End(xlUp).Select
Selection.End(xlToRight).Select
it should move one column towards right before pasting
ActiveSheet.Paste

End Sub





Re: Edittin Macors in EXCEL

Andy Pope


Hi,

This will paste the range to the right of the current range.
So A1:E5 will be move to F1:J5

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 6/2/2007 by Administrator
'
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
Selection.End(xlUp).Select
Selection.End(xlToRight).Select
' it should move one column towards right before pasting

Selection.Offset(0, 1).Select

ActiveSheet.Paste

End Sub







Re: Edittin Macors in EXCEL

Ahmad Jamal

Thanx andy ,

It works , I am very glad, it will save a lot of my time , Thanks Again

Regards

Ahmad Jamal