Complete the code to lock cell A1 in Excel.
Select cell A1, then go to Format Cells and check the [1] option under Protection tab.
To lock a cell in Excel, you must check the Locked option in the Protection tab of Format Cells.
Complete the step to protect the worksheet after locking cells.
After locking cells, go to the Review tab and click [1] to enable protection.
To enforce cell locking, you must protect the worksheet by clicking Protect Sheet in the Review tab.
Fix the error in the formula to check if cell B2 is locked.
=CELL("protect", [1])
The CELL function requires the cell reference as a text string, so use "B2".
Fill both blanks to create a formula that returns TRUE if cell C3 is locked and FALSE otherwise.
=IF(CELL([1], [2])=1, TRUE, FALSE)
The CELL function with "protect" and the cell reference as a string returns 1 if locked, 0 if unlocked.
Fill all three blanks to create a formula that counts how many cells in range A1:A5 are locked.
=SUMPRODUCT(--(CELL([1], [2])=[3]))
The formula uses CELL with "protect" on each cell in A1:A5, compares to 1 (locked), and sums the TRUE values.