I'm attempting create a macro that will add a new line below the line in which the user is, copies all data and formulas from the line above, except for columns G and H. Ends in Column G, ready for editing. I came up the macro below, which does what I want, if you are in row 3, but how do I generalize it.
Another way to ask the question, how do I change the reference
Rows("4:4").Select
to something that means select the row below the one I'm in. e.g.
Rows("the-one-I'm-in+1").Select
Sub AddSecondProduct()
'
' AddSecondProduct Macro
'
Rows("4:4").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("3:3").Select
Selection.Copy
Rows("4:4").Select
ActiveSheet.Paste
Range("G4:H4").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("G4").Select
End Sub
Any help appreciated.
JensPeter
Bookmarks