is it possible to use conditional formatting to lock any cell containing a formula?
Or is there another way?
If not I can add HasFormula to a selection change procedure, but I'd like it to work outside of VBA.
is it possible to use conditional formatting to lock any cell containing a formula?
Or is there another way?
If not I can add HasFormula to a selection change procedure, but I'd like it to work outside of VBA.
Why don't you protect the sheet. You can also hide the formulas
http://j-walk.com/ss//excel/usertips/tip060.htm
or press F5 > special > formulas then right click and unlock cells
then in data validation add
VBA Noob=CELL("protect",A1)=0
_________________________________________
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
I am using the sheet protection.
And have locked every current cell with a formula.
As I add formulas later I have to remember to protect each cell.
I just wanted it to automatically get protected.
Guess code it is then
VBA Noob
You can't do it with Conditional Formatting but you can do it with Validation (although it's certainly easier to lock and unlock the spreadsheet when you need to add formulas as VBA Noob suggested.
Here's how
1. Select all your formulas as follows;
.......F5, then "Special" then Formulas
2. Open Validation from Data dropdown
3. Choose Custom and in the formula box, type =""
No one can overwrite your formulas without first figuring out that they need to disable your validation criteria.
ChemistB
Wouldn't a user just be able to delete the formula then though?
Sorry, you need to unclick "Ignore blank" also. Then it doesn't allow you to erase the formula.
ChemistB
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks