Lock a formula to a column of cells

D

dragons_lair

I have a running balance total but as other users access this form they
inadvertently delete the formula or add more rows than have been allowed. I
can use data protection for the form but this then creates problem if they
need to add additional rows. Is there any way I can set the formula to appear
automatically in the cell such as data validation?
 
J

Joe Nastasi

This is not exactly what you are asking for... but you can lock only the
cell with formula by selecting all the cells in the worksheet, then select
"Format.Cells.Protection" and uncheck the "Locked" checkbox... then go to
the cell with your formula and select "Format.Cells.Protection" and check
the "Locked" checkbox to re-lock the cell with your formula.

Then go to Tools.Protection.Protect Worksheet" and check the box that says
"Insert Rows" under the heading "Allow all users" then all your users will
be able to insert rows and change all cells but your formula cell.

If you want to make sure the formula sums all rows above the row with your
formula (in case users insert extra rows), then you can use the following:
=SUM(INDIRECT(ADDRESS(1,COLUMN())):INDIRECT(ADDRESS(ROW()-1,COLUMN())))
 
J

Joe Nastasi

This is not exactly what you are asking for... but you can lock only the
cell with formula by selecting all the cells in the worksheet, then select
"Format.Cells.Protection" and uncheck the "Locked" checkbox... then go to
the cell with your formula and select "Format.Cells.Protection" and check
the "Locked" checkbox to re-lock the cell with your formula.

Then go to Tools.Protection.Protect Worksheet" and check the box that says
"Insert Rows" under the heading "Allow all users" then all your users will
be able to insert rows and change all cells but your formula cell.

If you want to make sure the formula sums all rows above the row with your
formula (in case users insert extra rows), then you can use the following:
=SUM(INDIRECT(ADDRESS(1,COLUMN())):INDIRECT(ADDRESS(ROW()-1,COLUMN())))
 
R

Ron@Buy

Another option to Joe's formula where you can control the range of rows to
sum is:
=SUM(A$6:INDEX(A:A,ROW()-1))
 
R

Ron@Buy

Another option to Joe's formula where you can control the range of rows to
sum is:
=SUM(A$6:INDEX(A:A,ROW()-1))
 
D

dragons_lair

Thanks for the info, not quite what I was after but I did learn a new formula
which has proved very useful
 
D

dragons_lair

Thanks for the info, not quite what I was after but I did learn a new formula
which has proved very useful
 

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