Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
i need a macro that inserts rows the same as the macro below but will
also copy the formatting and formula from the row above Sub Macro1() '-- Ken Wright, 2003-08-09 Application.ScreenUpdating = False Dim numRows As Integer Dim r As Long Dim Rng As Range Dim lastrw As Long numRows = InputBox("How many Rows") lastrw = Cells(Rows.Count, "A").End(xlUp).Row Set Rng = Range(Cells(1, "A"), Cells(lastrw, "A")) For r = Rng.Rows.Count To 1 Step -1 Rng.Rows(r + 1).Resize(numRows).EntireRow.Insert Next r Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Activate a macro to insert a row and copy the formuals from the rows above to the blank row | Excel Discussion (Misc queries) | |||
copy / paste selective rows | Excel Discussion (Misc queries) | |||
Copy conditional formatting across multiple rows? | Excel Discussion (Misc queries) | |||
Copy Word table into Excel cell by cell | Excel Discussion (Misc queries) | |||
Paste rows of numbers from Word into single Excel cell | Excel Discussion (Misc queries) |