Macro to insert row always at botom of table
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Macro to insert row always at botom of table

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

    Default

     
    Basic problem:

    The macro I have now always inserts a row at the same line in the table. I need one that inserts (or adds) a new row at the botom of the table, including the formulas of the previous rows. Any suggestions out there?

    Thanks!

    Pete

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    =ActiveCell.Address
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    I reckon this should do the trick.
    It finds the last row, copies it and pastes it into the row beneath.

    Sub test()

    Lastrow = Range("A65536").End(xlUp).Row
    Rows(Lastrow & ":" & Lastrow).Select
    Selection.Copy
    Rows(Lastrow + 1 & ":" & Lastrow + 1).Select
    ActiveSheet.Paste

    End Sub


    Rgds
    AJ

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
  •  

 

 
DMCA.com