Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copying row & inserting
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting Lines or Copying lines with formulas but without data | Excel Discussion (Misc queries) | |||
Prevent Copying Data | Excel Discussion (Misc queries) | |||
Automatically copying fomulae when Inserting rows | Excel Discussion (Misc queries) | |||
Problems copying street addresses and dates | Excel Discussion (Misc queries) | |||
copying cells from other worksheets | Excel Discussion (Misc queries) |