Macro to Insert and copy entire row

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to create a macro that goes to the last row of data, goes to the
next row and then inserts a row. I then need it to copy & paste from the row
above it (formulas & formats only). Here is what I have so far, but its not
working.

range("A7").Select
Selection.End(xlDown).Select , Offset(1, 0)
Selection.EntireRow.Insert

range("NewPartDescr").Offset(-2, 0).EntireRow.Copy
range("NewPartDescr").Offset(-1, 1).EntireRow.Select

Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False

Application.CutCopyMode = False
 
Without selections.

Sub copylastrowdown()
lr = Cells(Rows.Count, "a").End(xlUp).row
Rows(lr).Copy
Rows(lr + 1).PasteSpecial Paste:=xlPasteFormats
Rows(lr + 1).PasteSpecial Paste:=xlPasteFormulas
'cells(lr + 1,"a").select 'uncomment to select
End Sub
 
Back
Top