ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do I insert row keeping formulas from previous row? (https://www.excelbanter.com/excel-discussion-misc-queries/246949-how-do-i-insert-row-keeping-formulas-previous-row.html)

Todd108

how do I insert row keeping formulas from previous row?
 
I've developed a protected sheet in excel 2003. I have protection set to
allow inserting rows. Unfortunately, the inserted row doesn't have formulas
of columns from previous row. Any way to do this?

Because what happens is users simply unprotect the sheet, and then copy and
insert rows in order to keep formulas intact in the inserted row. Of course
I don't want them unprotecting the sheet because then they can reek havoc.

Advice? Many thanks

Dave Peterson

how do I insert row keeping formulas from previous row?
 
You could give them a macro that would unprotect the worksheet, insert a new
row, copy|paste the values and formulas to the new row, delete the values in
that new row (if you want) and then reprotect the sheet.

If you want to try, start at David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/insrtrow.htm
look for: InsertRowsAndFillFormulas

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

Todd108 wrote:

I've developed a protected sheet in excel 2003. I have protection set to
allow inserting rows. Unfortunately, the inserted row doesn't have formulas
of columns from previous row. Any way to do this?

Because what happens is users simply unprotect the sheet, and then copy and
insert rows in order to keep formulas intact in the inserted row. Of course
I don't want them unprotecting the sheet because then they can reek havoc.

Advice? Many thanks


--

Dave Peterson


All times are GMT +1. The time now is 08:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com