Copy formulas

  • Thread starter Thread starter Tonie Crawford
  • Start date Start date
T

Tonie Crawford

I have a worksheet that I want someone to just be able to
insert a row and formulas in one cell can be copied to the
new row.

Tonie
 
You didn't say what version but this should do it.
Inserts a row and copies the row above

Sub NewLineA()
x = Cells(65536, "a").End(xlUp).Row
Cells(x, "a").EntireRow.Insert
Cells(x - 1, "a").EntireRow.Copy Cells(x, "a")
Cells(x, "a").EntireRow.ClearContents
End Sub
 
I tried to copy the subroutine into a macro and I could
not get it to work.
I am running excel 2000. I have a sheet that I built for
billing and everytime my secretary enters information she
overwrites my formulas so I protected the column with
formulas in it and I want to create a macro that will
insert a new row with the formulas from the cell above
copied into it. I can get it to work for 2 rows and then
it doesn't copy anymore.

Please help
 
Back
Top