![]() |
![]() |
|
|||||||
| 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: Apr 2002
Posts: 13
|
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 |
|
Board Regular
Join Date: Mar 2002
Location: =ActiveCell.Address
Posts: 478
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|