![jupyter notebook tutorial youtube jupyter notebook tutorial youtube](https://i.ytimg.com/vi/4AT1PcbEzjw/maxresdefault.jpg)
After this refresher on how to lock cells in Excel, let’s see how it’s done in a Jupyter notebook! Locked cells in Jupyter notebooks Once you have removed that checkbox on all cells that should remain editable, go back to Home > Review and protect the sheet again by clicking the Protect Sheet button. On the Protection tab, uncheck the Locked checkbox: That’s usually not what you want: to leave some cells editable for the user to provide the inputs, unprotect the sheet again (the Protect Sheet button from before has changed its label to Unprotect Sheet), then right-click a cell and select Format Cells.
![jupyter notebook tutorial youtube jupyter notebook tutorial youtube](https://i.ytimg.com/vi/Gn416gjOj0c/maxresdefault.jpg)
Once a sheet is protected, by default, none of the cells are editable anymore and you’ll get the following error whenever you try to edit one: When you click that button, there’s a pop-up menu where you can change a few options and decide whether users need a password to unprotect the sheet or not. However, this will only come into effect once you go to the ribbon tab Home > Review and click on the Protect Sheet button: Table of Contentsīy default, cells in Excel are locked. In this tutorial, I’ll first look into how to protect cells in Excel before I’ll explain how the same works in a Jupyter notebook. Turns out that Jupyter notebooks have the same functionality, but unfortunately, this functionality is a bit hidden and requires a few manual steps. Now, in Excel, you should be afraid of the same (i.e., users changing formulas), but Excel has an option to lock cells to prevent exactly this: locked cells are an effective way to prevent end-users from changing a value or formula by accident. Recently, this happened to me when a Jupyter notebook user told me that they weren’t able to use their Jupyter notebooks with non-Python savvy users since the risk of them inadvertently changing the code cells was too high. Excel and Jupyter notebooks have a big overlap regarding their use case (analyzing data and showing some fancy charts/numbers), which means that you’ll find yourself occasionally looking for some “Excel functionality” in Jupyter notebooks.