Inserting a new row below previous row macro

Microsoft Excel 2010 - complete product...
October 1, 2012 at 07:33:36
Specs: Windows 7
I am trying to write create a spreadsheet where by clicking a button attached to a macro a new row will appear. I would like the new row to appear below the last row written in. However, I am having trouble because the first time I click the macro button the row inserts correctly below the last written in row. However, each subsequent time I use the button the macro is inserted above my previous row. FYI... I also have a simple formula in each row.

See More: Inserting a new row below previous row macro

Report •

October 1, 2012 at 07:48:41
Perhaps if you posted the macro you've been trying, we could help you modify it.

Since we need some specific information before we could offer any code, it would probably be just as easy to "fix" what you have already written as opposed to starting from scratch.

If it helps, the following instruction is typically used to find the last cell with data in a given column, Column A in this case:

lastRow = Range("A" & Rows.Count).End(xlUp).Row

To find the next empty row, this is often used:

lastRow = Range("A" & Rows.Count).End(xlUp).Row + 1

Please click on the following line before posting your code. That link will provide instructions on how to post code in this forum.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •
Related Solutions

Ask Question