drag-driver
Board Regular
- Joined
- Feb 18, 2002
- Messages
- 91
Code works but copys value stored where as i need it to copy the formulae present.Here is the code:
Sub Test()
Dim CopyTimes As Integer
Dim CopyLoop As Integer
CopyTimes = Worksheets("sheet1").Range("A1").Value
If CopyTimes <= 1 Then Exit Sub
For CopyLoop = 1 To CopyTimes
'assume A2 has the data, B2 is the place to start storeing
Worksheets("sheet1").Range("B" & CopyLoop + 1).Value = Worksheets("sheet1").Range("A2").Value
Next CopyLoop
End Sub
Sub Test()
Dim CopyTimes As Integer
Dim CopyLoop As Integer
CopyTimes = Worksheets("sheet1").Range("A1").Value
If CopyTimes <= 1 Then Exit Sub
For CopyLoop = 1 To CopyTimes
'assume A2 has the data, B2 is the place to start storeing
Worksheets("sheet1").Range("B" & CopyLoop + 1).Value = Worksheets("sheet1").Range("A2").Value
Next CopyLoop
End Sub