Have simple copy-paste macro, but I'd like to be able to run it exactly 5,000 times without holding down Ctrl+r for 10 minutes. Would someone please show me how to modify this code so that another macro will run the 'DTC_copy_paste Macro' 5,000 times? Thanks!
Sub DTC_copy_paste() ' ' DTC_copy_paste Macro ' ' Keyboard Shortcut: Ctrl+r ' ActiveCell.FormulaR1C1 = "=R[3]C[120]" Range("A1").Select Selection.Copy Range("A2").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub
Last edited by Greg777; 01-22-2012 at 03:20 AM.
Sub DTC_copy_paste() ' ' DTC_copy_paste Macro ' ' Keyboard Shortcut: Ctrl+r ' Dim HowManyTimes As Long: HowManyTimes = 500 Dim i As Long For i = 1 To HowManyTimes ActiveCell.FormulaR1C1 = "=R[3]C[120]" Range("A1").Select Selection.Copy Range("A2").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Next i End Sub
To thank someone who has helped you, click on the star icon below their name.
I hate reading
Portfolio
I need a job.I am young and incompetent
Works- thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks