mcgurrgurr
New Member
- Joined
- Aug 22, 2011
- Messages
- 8
Dim PasteUpdate
Sub loop()
PasteUpdate = "18"
MyNum = 0
Do
MyNum = MyNum + 1
Range("AA" & PasteUpdate).Select
ActiveCell.Offset(ColumnOffset:=1).Activate
Range("AB" & PasteUpdate & ":AH" & PasteUpdate).Select 'fix this
Selection.Copy
Range("B7").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Loop Until MyNum = 5
End Sub
I'd like the PasteUpdate variable to update one (18, 19, 20, etc.) each time the program runs so it will work on n number of values, depending on the type of data needed.
Sub loop()
PasteUpdate = "18"
MyNum = 0
Do
MyNum = MyNum + 1
Range("AA" & PasteUpdate).Select
ActiveCell.Offset(ColumnOffset:=1).Activate
Range("AB" & PasteUpdate & ":AH" & PasteUpdate).Select 'fix this
Selection.Copy
Range("B7").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Loop Until MyNum = 5
End Sub
I'd like the PasteUpdate variable to update one (18, 19, 20, etc.) each time the program runs so it will work on n number of values, depending on the type of data needed.