View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
bundyloco[_7_] bundyloco[_7_] is offline
external usenet poster
 
Posts: 1
Default Inserting Variable Number of Rows


I'm trying to create a chunk of code that copies an entire row and then
inserts a variable amount. here is the code

insertrows = 3 + prodlength
Rows("3:3").Select
Selection.Copy
Rows("4:insertows").Select
Selection.Insert Shift:=xlDown

Is it possible to do something like this? I'm trying to do this method
because it copying and inserting rows preserves all the formatting. The
variable prodlenght is the number of products found off another
worksheet in the workbook.


--
bundyloco
------------------------------------------------------------------------
bundyloco's Profile: http://www.excelforum.com/member.php...o&userid=23386
View this thread: http://www.excelforum.com/showthread...hreadid=399996