![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 1
|
Is it possible to automatically insert a new blank row between each row of data on a spreadsheet without manually inserting each new row?
|
|
|
|
|
|
#2 |
|
New Member
Join Date: Feb 2002
Location: Brazil
Posts: 4
|
You can create a macro and to attribute this macro to a menu button. To create to macro, make the insert recording to macro. At the end it publishes to macro altering the point where she selected the interval for activecell. It should work.
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Georgia USA
Posts: 544
|
The Marco below, written by Barrie Davidson, will do what you want.
Sub Insert_rows() ' Written by Barrie Davidson Dim insertNumber As Integer On Error Resume Next Range("A1").Select insertNumber = CInt(InputBox("Enter number of rows to insert")) If insertNumber <= 0 Then MsgBox ("Invalid Number Entered") Exit Sub End If Do Until Selection.Value = "" ActiveCell.Offset(1, 0).Range("A1:A" & insertNumber).Select Selection.Insert Shift:=xlDown ActiveCell.Offset(insertNumber, 0).Select Loop Range("A1").Select End Sub |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|