How To Lock Cell In Excel Function
If you want to lock cells or protect specific areas click open in excel and lock cells to protect them or lock or unlock specific areas of a protected worksheet.
How to lock cell in excel function. Lock or unlock cells based on values in another cell with vba code. To lock specific cells in excel first unlock all cells. Right click the sheet tab the sheet with cells you need to lock or unlock based on values in another cell and click view code from the right clicking menu. When you start using data tables in excel many users are frustrated to discover that the normal methods for freezing the row or column references dont work.
As you can see excel puts in dollar signs locking the cell entirely when you click f4 for the first time. Next lock specific cells. Select lock cell under the protection tab. Go to home tab cell group and click on format.
Right click and then click format cells or press ctrl 1. The cell row has now been locked but the column has not. Excel for the web cant lock cells or specific areas of a worksheet. Follow these steps to lock cells in a worksheet.
We lock cells in excel to protect them so that there isnt any unwanted changes in the cell by default all the cells in excel are locked which can be seen by right click on the cell and then click on format options which will open a wizard box for us now click on protection tab and we can see the option for locked cells to protect a cell after locking it we need to put a protection by. Select the cells that you want to lock. In the below image in column d the total has been calculated by inserting the formula b2c2 in cell d2. In order for us to lock cell l12 we click on the reference within that formula and then press f4 to lock it.
Now if we press f4 again we notice one of the dollar signs is removed. Finally protect the sheet. On the protection tab uncheck the locked check box and click ok. For example select cell a1 and cell a2.
Most excel users figure out how to lock these references by either toggling through the options with the f4 key or using the dollar sign symbol in front of the column andor row references.