View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
StumpedAgain StumpedAgain is offline
external usenet poster
 
Posts: 192
Default Inserting Rows - Complicated

Anything's possible. ;)

What I would do:

Sub insertrowhere()

Dim cell As Range
Set cell = Range("B2")

For i = 1 To cell.Value
cell.Offset(1, 0).EntireRow.Insert
cell.EntireRow.Copy Destination:=cell.Offset(1, 0).EntireRow
Next i

End Sub

You can set cell however you want and go from there.
Hope this helps!
--
-SA


"suestew" wrote:

I need to insert the number of rows that corresponds with a number in an
existing column. For example: My number at B2 is 3 so I would need to
insert three rows immediately after row 2. My goal would be to have three
rows with the identical information from Row 2 in rows 3,4 and 5. Is this
possible?