Blocked does not access formatting until allow cells are checked or activated in vba. Therefore, you can simply unlock B1 and you will not be able to edit the format, allowing users to select locked and unlocked cells.
Sub protectorate() activesheet.Range("B1").Locked = False With ActiveSheet .Protect End With End Sub
This will prevent formatting and changing the values โโof the entire sheet, except for the value of B1, it will still allow you to edit the value of B1.
scott
source share