MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Large copying


Posted by Brian on November 05, 2001 12:00 PM

Hello, every month I have a file of records that varies per month. I need to copy and paste down this file about 30 to 40 times every month with a blank row between each group. Is there a quick way of doing this??

thanks!!!


Posted by Bob Umlas on November 05, 2001 12:51 PM

Sub copypaste()
num = Application.InputBox("Copy how many times? (ex 30, 40, ...)", Type:=1)
Set rg = Range("A1").CurrentRegion
n = rg.Rows.Count + 1
rg.Resize(n).Copy Cells(n + 1, 1).Resize(n * num)
End Sub

Posted by Brian on November 06, 2001 11:36 AM

error : rg.Resize(n).Copy Cells(n + 1, 1).Resize(n * num) ??????

Posted by Brian Deuce on November 06, 2001 11:52 AM

It is working however, can it prompt me every time it goes to copy so I can enter in a different value in column A to copy down?

thanks by the way - it kicks butt!!