A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Copy and insert multipel rows after each row of data



 
 
Thread Tools Display Modes
  #1  
Old June 3rd, 2010, 11:36 PM posted to microsoft.public.excel.misc
myork
external usenet poster
 
Posts: 1
Default Copy and insert multipel rows after each row of data

I need to copy a row and insert it 19 times in the rows below it, for 100+
rows.
  #2  
Old June 4th, 2010, 12:26 AM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Copy and insert multipel rows after each row of data

You have 100+ rows.

One column or many columns of data?

Each row is to be duplicated 19 times for a total of 1900+ rows when
complete?

You want to do this manually or by code?


Gord Dibben MS Excel MVP

On Thu, 3 Jun 2010 15:36:44 -0700, myork
wrote:

I need to copy a row and insert it 19 times in the rows below it, for 100+
rows.


  #3  
Old June 4th, 2010, 06:24 AM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Copy and insert multipel rows after each row of data

Try the below macro..

Sub MyMacro()
Dim lngRow As Long
lngRow = 1
Do While Range("A" & lngRow) ""
Rows(lngRow).Offset(1).Resize(19).Insert
Rows(lngRow).Copy Rows(lngRow + 1 & ":" & lngRow + 19)
lngRow = lngRow + 20
Loop
End Sub

--
Jacob (MVP - Excel)


"myork" wrote:

I need to copy a row and insert it 19 times in the rows below it, for 100+
rows.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.