Excel - macro to lookup cell and add new row


I want to create a macro which will look at for example column A and find the last number entered then add a row below it and to do this every time its ran.


You can use this macro :

Sub Insert_Row() 
Dim n As Integer 
n = Cells(Rows.Count, 1).End(xlUp).Row  
    Selection.Insert Shift:=xlUp 
End Sub


Thanks to aquarelle for this tip on the forum.
Published by iveal. Latest update on April 3, 2010 at 07:26 AM by iveal.
This document, titled "Excel - macro to lookup cell and add new row," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (https://ccm.net/).
Excel - Count 2 values in one column and 1 value in other
Excel - Comparing Column Values