lock cells based on formula result

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a formula in Column O7:O37 of a spreadsheet. I need cells B7:N37 to
lock when the value from the formula exceeds a certain threshold. Is this
possible?


Thanks for the help,
Mike
 
Possible, but a little difficult. Ordinarily this would be handled through
some VBA code (macro) based on an event triggering on the sheet, such as a
value in one of the O7:O37 cells changing. However, changes caused by a
formula don't trigger the event. What has to be done is track back through
those formulas to find where a value is entered/changed within the workbook
that affects the results of those cells. Then some Worksheet_Change() event
handling at that point can be done to deal with:
unprotecting the sheet,
locking the appropriate column B:N cell(s)
putting the sheet back into protected state so that the locks take effect.

The other side of the coin is when do you UNLOCK those cells after they've
been locked down?

But, yes, in theory it's possible to do what you want.
 

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

Similar Threads


Back
Top