Craig13_13
New Member
- Joined
- Apr 9, 2009
- Messages
- 21
Hi all,
I have the following code for finding the last column of data, copying it and pasting into the next column (basically to dynamically copy all my formulas over as and when I need more space).
Rather than repeat this same string of code 5 times I believe it is possible to do a loop to repeat this, however I have never managed to use one (sucessfully!) before now, would anyone be able to help please?
Range("A7:A8").Select
Selection.End(xlToRight).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("A7:A8").Select
Selection.End(xlToRight).Offset(0, 1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
I have the following code for finding the last column of data, copying it and pasting into the next column (basically to dynamically copy all my formulas over as and when I need more space).
Rather than repeat this same string of code 5 times I believe it is possible to do a loop to repeat this, however I have never managed to use one (sucessfully!) before now, would anyone be able to help please?
Range("A7:A8").Select
Selection.End(xlToRight).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("A7:A8").Select
Selection.End(xlToRight).Offset(0, 1).Select
ActiveSheet.Paste
Application.CutCopyMode = False