insert new row & fill down

J

Jack

Hi,

I'm trying to write a macro that allows users to insert a
new blank row anywhere on the spreadsheet AND fill down
the formulas from the above row.

For example,

Sheet 1 - an user wants to insert a blank row on line 50
and copy the formula from line 49 and the whole
spreadsheet shifts down one cell.

I've tried the record macro function and edit the script
but I get a run-error.

Here's the record macro script:

Sub testinsert()
Rows.EntireRow.Select
Selection.Insert Shift:=xlDown
Selection.FillDown
End Sub

I got a run-time error on line 2.

Thanks in advance.
 

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

Top