Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Automatic insertion of rows

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    New Member
    Join Date
    Feb 2002
    Location
    Brazil
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Georgia USA
    Posts
    569
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •