The current process is way too complicated and cumbersome. How about a simple command like CONTROL + SHIFT + “P”
The protected cell could then have some little indicator like dotted or thicker bar grids. Perhaps cells could be protected by a color selection pre-determined in a table option. For example yellow and white cells couldn’t be altered but green ones can. Unprotecting the cells could be say CONTROL + SHIFT + “p”. Capital P locks the cell and small p unlocks it.
Excuse me, my friend, do you really think that Shift+P is different from Shift+p? Actually, it does not matter. Since cell only two states - protected and unprotected - repeated pressing the same keys can switch between these states. This task has been repeatedly decided by a simple macros. And highlighting by using conditional formatting on the condition =CELL(“PROTECT”; ) also repeatedly implemented.
I add that without conditional formatting, simply switch to “View> Value highlighting” (ctrl + F8): protected cells are grayed out when protection is enabled
Yes, but unfortunately it’s work only when sheet is already protected. CF can show cells that will be protected when you will set protection on sheet
@JohnSun - Of course, but you have nothing to do. The shortcut already exists.
Moreover, the proposed CF can not be “switched” (on / off) easily. The formula should be completed to test “something else” (eg. a cell’s content). And it may be in conflict with other formats defined for the range.
That said for my part I only use styles to protect. So I just have to change the color of the “master” style if I want to see the effect.
In short, current feature is perfect for me
@PYS Yes, you are absolutely right! The combination of a cell style (which can call with hot key) and Value highlighting - is the best solution. Can you prepare a recommendation step-by-step as the answer to this question?
Hi - In the ProtectCell.ods attached, formatting and cell protection is achieved by applying styles. Protected areas are:
- Titles (C1 & A3:D3)
- Calculated ranges (C4:D9)
When the protection is enabled, use Ctrl + F8 to gray protected cells.
To view protected areas when protection is not enabled right click in the Styles Window on “ProtectMaster”> Modify, Background tab, choose a color (Chart3 in the example).
Steps to reproduce this example:
- Right click “Default” in the Styles Window (Cell styles) > Modify: Unprotect.
- Create the “master” style (ProtectMaster in the example), Protect
- Right click on this style > New to create “dependent” styles (ProtectCurrency & ProtectTitles in the example). These styles “inherit” protection as they inherit the color.
This example only protects some cells, others are not (default). It goes without saying that one can do the opposite…
In addition:: You can assign a keyboard shortcut to quickly apply this style. Just choose Tools - Customize - Keyboard tab
Many thanks pierre-yves samyn. Just the help I needed. Downloaded your file and all was clear !