Created
August 6, 2013 06:31
-
-
Save ducalpha/6162528 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub CopyMultipleDiscreteCells() | |
' | |
' Copy multiple dicrete cells | |
' | |
' | |
Dim i As Long | |
For i = 1 To 9 | |
Selection.Copy | |
ActiveCell.Offset(10, 0).Select | |
ActiveSheet.Paste | |
Next i | |
End Sub | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub SelectDiscreteCells() | |
' | |
' Select discrete cells | |
' | |
Dim range | |
Set range = Selection | |
Dim i As Long | |
For i = 1 To 9 | |
ActiveCell.Offset(10, 0).Select | |
Set range = Union(range, Selection) | |
Next i | |
range.Select | |
End Sub | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment