inserting rows with formulas

  • Thread starter Thread starter ~Ken~
  • Start date Start date
K

~Ken~

Hi

Does anyone know how to code a button on the worksheet to
insert 2 rows above the active cell and then copy the
formulas down (or up) from the rows that are adjacent?

Many thanks
Ken
 
This should work, adjust ColumnToFill as needed.

Dim R As Integer, ColumnToFill As Integer
R = ActiveCell.Row
ColumnToFill = 1
ActiveCell.EntireRow.Insert
Range(Cells(R - 1, ColumnToFill), Cells(R, ColumnToFill)).FillDown
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top