Add rows
Closed
nilin
-
Jul 22, 2010 at 09:36 AM
rizvisa1
rizvisa1
- Posts
- 4479
- Registration date
- Thursday January 28, 2010
- Status
- Contributor
- Last seen
- May 5, 2022
1 reply
rizvisa1
Jul 22, 2010 at 02:12 PM
- Posts
- 4479
- Registration date
- Thursday January 28, 2010
- Status
- Contributor
- Last seen
- May 5, 2022
Jul 22, 2010 at 02:12 PM
Sub InsertRow() Dim lMaxRows As Long lMaxRows = Cells(Rows.Count, "A").End(xlUp).Row Do While (lMaxRows > 0) Rows(lMaxRows + 1 & ":" & lMaxRows + 2).Insert Cells(lMaxRows, "A").Copy Range(Cells(lMaxRows + 1, "A"), Cells(lMaxRows + 2, "A")).PasteSpecial lMaxRows = lMaxRows - 1 Loop End Sub