Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
I'm trying to write a macro which inserts rows depending on a number in a cell at the end of the row/information. Ie. if the number in the cell is 4 insert 4 rows. number = 7, 7 rows. If needs to sweep through column m looking for numbers and inserting rows until the it goes blank. cheers for any advise in advance... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assumes A1 contains the value for the number of rows.
Range("D7") is arbitrary. You can start with ActiveCell or any other cell designation. Sub dk() Range("D7").Resize(Range("A1").Value, 1).EntireRow.Insert End Sub "project manager" wrote in message ... hi, I'm trying to write a macro which inserts rows depending on a number in a cell at the end of the row/information. Ie. if the number in the cell is 4 insert 4 rows. number = 7, 7 rows. If needs to sweep through column m looking for numbers and inserting rows until the it goes blank. cheers for any advise in advance... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
insert rows in a worksheet that do not change adjoining rows | Excel Discussion (Misc queries) | |||
How do i insert blank rows between data that is thousands of rows | Excel Discussion (Misc queries) | |||
Insert rows: Formats & formulas extended to additonal rows | Excel Worksheet Functions | |||
Insert page breaks every 50 rows but do not include hidden rows | Excel Programming | |||
How do I insert blank rows between rows in completed worksheet? | Excel Discussion (Misc queries) |