Macro help. Insert row and copy formulas from row above

K

Kesbutler

I have a worksheet that I need to insert rows but copy only the formulas from
the row above. Any suggestions?
 
J

Joel

to copy the last row and maintain your formulas it is best to copy the last
row and insert the copy before the last row. Thne clear the non-formula
cells from the last row. A little backwards, but it will work.


Lastrow = range("A" & rows.Count).end(xlup).Row
Rows(Lastrow).copy
Rows(Lastrow).Insert
Rows(Lastrow + 1).SpecialCells(xlCellTypeConstants).ClearContents
 
K

Kesbutler

I have following formula working. But the new row is not protected. Is there
a way to have the macro lock the cells with the formula so they cannot be
updated by users?

Thanks
 
K

Kesbutler

Is there a way to have it copy only the formulas? Also, the workbook will be
password protected.
 

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