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

Thread: Automatically Insert a New Row

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

    Default

    How can I automatically insert a row directly underneath a cell that I type something in?
    There are a couple hundred rows in the sheet but I need to add a new row directly underneath a cell that I just typed in, in the middle of the sheet.
    Any suggestions?

    [ This Message was edited by: Q45 on 2002-02-21 19:46 ]

  2. #2
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Q, maybe an event procedure like the following will work:

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    activecell.offset(1,0).select
    Selection.EntireRow.insert
    End Sub

    Put it in a sheet module, right click on sheet, select view code and paste it in there.

    HTH, Nate

    [ This Message was edited by: NateO on 2002-02-21 19:58 ]

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
  •