Try this:
![]()
Sub CopyXTimes() Dim X As Long, i As Long X = Application.InputBox("Copy A1 how many times?", "Repeat", 100, Type:=1) If X = 0 Then Exit Sub For i = 1 To X Range("AO1").Offset(i).Value = Range("A1").Value Next i End Sub
Try this:
![]()
Sub CopyXTimes() Dim X As Long, i As Long X = Application.InputBox("Copy A1 how many times?", "Repeat", 100, Type:=1) If X = 0 Then Exit Sub For i = 1 To X Range("AO1").Offset(i).Value = Range("A1").Value Next i End Sub
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks