Excel macro to lookup cell and add new row

[Closed]
Report
Posts
1
Registration date
Saturday March 20, 2010
Status
Member
Last seen
March 20, 2010
-
Posts
7098
Registration date
Saturday April 7, 2007
Status
Moderator
Last seen
June 10, 2021
-
Hi,

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.

Thank you,

1 reply

Posts
7098
Registration date
Saturday April 7, 2007
Status
Moderator
Last seen
June 10, 2021
488
Hello,

Try with this macro :

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


Best regards
"Pour trouver une solution à ses problèmes, il faut s'en donner la peine."