Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50068

Add custom row macro

$
0
0
Hi all,

I've done a few google searches but if this has been explained elsewhere, please link the relevant thread.

I'm fairly new to writing macros. I've created a button control associated with the below macro to add custom rows in a simple revenue projection sheet. The macro is shifting row references by 1 every time the macro is used, effectively invalidating my formulas.

Code:

Sub Add_Row
'
' Add_Row Macro
' Macro recorded 2/16/2013 by user

      Range ("A2:P2") .Select
      Selection.Copy
      Range ("A14:P14") .Select
      Selection.Insert Shift:=xlDown
End Sub


Viewing all articles
Browse latest Browse all 50068

Trending Articles