View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
David McRitchie David McRitchie is offline
external usenet poster
 
Posts: 903
Default Copying row & inserting

see
Insert a Row using a Macro to maintain formula
http://www.mvps.org/dmcritchie/excel/insrtrow.htm
--
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Chance224" wrote in message ...
I'm using the macro below to insert a number of rows specified by a user. I
need to have it copy the row above the selected cell and insert the number of
rows specified and then delete the data in columns A,B,J,L in the rows
inserted.

Sub InsertRows()
Dim Rng
Rng = InputBox("Enter number of rows required.")
Range(ActiveCell.Offset(0, 0), ActiveCell.Offset(Rng - 1, 0)).Select
Selection.EntireRow.Insert
End Sub

Thanks,
Chance