How to Lock Cells in Excel on SharePoint Step by Step

How-to basics · Updated November 18, 2026

To lock cells in an Excel workbook stored on SharePoint, open it in the Excel desktop app, unlock the cells people should be able to edit, then protect the worksheet. Save the workbook back to SharePoint. Cell locking only takes effect after sheet protection is turned on, and it is different from controlling who can open or edit the file.

What You’ll Need

  • Permission to edit the Excel workbook in its SharePoint library.
  • Excel for Microsoft 365 on Windows. Excel for the web can be useful for everyday edits, but use the desktop app to set up protection and cell locking reliably.
  • A list of the cells or ranges collaborators should be able to change, such as input fields, and those that should stay read-only, such as formulas or headings.
  • Optionally, a sheet-protection password. Keep it somewhere safe: Microsoft cannot retrieve a forgotten worksheet password for you.

Step-by-Step

  1. Open the workbook from SharePoint in the desktop app. In the SharePoint document library, select the workbook. Choose Open or Open in app, then choose Open in Desktop App if prompted. If it opens in Excel for the web, use the editing menu near the top of the workbook and select the option to open it in the desktop app. Sign in with the account that has edit access.

    Using the desktop app is important because it provides the complete Format Cells and Protect Sheet controls. Check the workbook name and location before making changes, especially if you have a downloaded copy as well as the SharePoint original. The changes need to be saved to the shared workbook, not only to a local duplicate.

  2. Check whether the worksheet is already protected. Select the worksheet tab you want to configure. On the ribbon, open Review. If the command says Unprotect Sheet, the sheet is already protected. Select it and provide the existing password, if requested, before changing which cells are locked. If the sheet is not protected, continue to the next step.

    Protection is set separately for each worksheet. If collaborators should be able to enter data on two tabs, configure and protect each tab individually. Protecting one sheet does not automatically protect the others.

  3. Identify the cells that should remain editable. For example, you might allow changes to the quantity and comment columns while keeping product names, calculations, and totals read-only. If the editable cells are in one continuous area, select that range. For separate ranges, hold Ctrl while selecting each one on Windows. On Mac, hold Command to select separate ranges.

    You can also use the Name Box to select a known range: click the box to the left of the formula bar, type an address such as B2:D30, and press Enter. Confirm that the selection is correct before changing its settings. Accidentally unlocking a formula range makes those formulas editable once the sheet is protected.

  4. Unlock the cells people are allowed to edit. With the editable range selected, open Home > Format > Format Cells. You can also press Ctrl+1 on Windows; on Mac, use Command+1. In the Format Cells dialog, select the Protection tab, clear the Locked check box, and select OK.

    Excel marks cells as locked by default, but that setting does not stop editing until you protect the worksheet. You are turning off the Locked setting only for the selected input cells. If your worksheet has several separate input ranges, repeat this step for each one. Do not clear Locked for the entire sheet unless every cell is meant to stay editable.

  5. Review the cells that should be locked. Formula cells, labels, instructions, and reference data normally remain locked. If you are unsure where the formulas are, use Home > Find & Select > Go To Special, choose Formulas, and select OK to select formula cells. This helps you inspect the formula areas before protection is applied; it does not replace checking that the intended input cells are unlocked.

    Consider marking input cells with a fill color or adding a short instruction such as Enter data in the shaded cells. That makes the allowed editing areas easier to spot. Formatting is only a visual cue, however; the Locked setting and worksheet protection control whether cells can be changed.

  6. Protect the worksheet. On the ribbon, select Review > Protect Sheet. In the dialog, leave Protect worksheet and contents of locked cells selected. Choose the actions collaborators may perform while protection is on. For a simple input form, you might allow selecting unlocked cells but not selecting locked cells. If users need to sort, filter, or format cells, consider the matching permissions, and test whether the intended task works with protection enabled.

    Enter a password if you want to discourage people from turning off protection, then select OK and enter the password again to confirm. A password is optional. Without one, a collaborator with editing access can generally remove sheet protection. With one, anyone who needs to change the protection settings must know it. The password does not encrypt the workbook or prevent someone with file access from copying its contents.

  7. Test both an unlocked cell and a locked cell. Try entering a temporary value in an allowed input cell. Then try changing a locked heading or formula cell. Excel should allow the first edit and block the second. If either result is wrong, unprotect the sheet, recheck the Locked setting for the relevant range, and protect it again. Remove any temporary test value before saving.

    Testing is especially useful when the sheet contains filters, tables, merged cells, or existing permissions. The actions allowed in the Protect Sheet dialog can affect what people can do, even if the cells are unlocked.

  8. Save the protected workbook to SharePoint. Press Ctrl+S on Windows or Command+S on Mac. Wait for Excel to finish saving or syncing, then check that the title bar or save status no longer indicates that changes are pending. If Excel asks where to save, choose the SharePoint location for the original workbook rather than creating an unrelated local copy.

    For a shared workbook, let collaborators know which cells they can edit and whether a password is needed to change protection settings. If your organization uses SharePoint version history, it can provide a way to restore an earlier file version if a change causes a problem, but it does not replace saving and checking the current workbook.

Common Mistakes

  • Locking cells without protecting the sheet. The Locked check box alone does not prevent editing. Select Review > Protect Sheet to activate the setting.
  • Forgetting to unlock the input cells first. Because cells are locked by default, protecting a sheet before unlocking the intended entry areas can leave users unable to type anywhere. Unprotect the sheet, clear Locked for the input ranges, and protect it again.
  • Unlocking too much. Selecting the whole worksheet and clearing Locked can leave formulas and labels editable. Select only the cells collaborators need to change, and verify the selection before opening Format Cells.
  • Confusing sheet protection with SharePoint permissions. Worksheet protection controls editing within a sheet; SharePoint permissions control who can access or edit the file. A sheet password is not a substitute for restricting access to sensitive information.
  • Assuming protection is security. Sheet protection is designed to prevent accidental changes, not to securely hide confidential content. Do not rely on it to protect sensitive data from someone who has access to the workbook.
  • Forgetting the password. A forgotten sheet-protection password can stop the team from changing the settings. Store it in an approved password manager or shared process accessible to the people responsible for the workbook.

Tips

  • Use separate input areas. Keep user-entry cells together where practical, rather than scattering them among formulas. This makes the unlocked ranges easier to review and explain.
  • Make the sheet easy to use. Apply a consistent fill color to editable cells and add concise instructions. You can also freeze headings or adjust column widths before protection, so the sheet remains clear to users.
  • Allow only the actions people need. In the Protect Sheet dialog, avoid granting every permission by default. If users need to filter a list, test the filter with protection on and enable the necessary option rather than assuming it will work.
  • Keep file access under SharePoint control. Use the SharePoint library’s access and sharing settings to manage who can open or edit the workbook. Ask a SharePoint owner or administrator for help if the file’s access needs to change.
  • Use version history as a recovery aid. If an accidental edit is saved, check the workbook’s SharePoint version history and follow your organization’s restore process. Restoring a version affects the shared file, so coordinate with collaborators first.
  • Check behavior in the browser. Collaborators may open the file in Excel for the web even if you configured protection in the desktop app. Browser features and available protection controls can differ, so test the actual editing workflow they will use. Reopen in the desktop app when you need to change cell locking settings.

Troubleshooting

Users can still edit a cell that should be locked: Confirm that the worksheet is protected; then unprotect it and check that the cell’s Locked box is selected in Home > Format > Format Cells > Protection. Protect the sheet again and retest. Also confirm that you protected the correct worksheet tab, not a similarly named one.

Users cannot edit an input cell: Unprotect the sheet and select the input range. In Format Cells, clear Locked, select OK, and protect the sheet again. Check for overlapping ranges or a missed part of the input area. If the workbook opens in a browser, try the desktop app to confirm whether the issue is related to the browser’s editing capabilities.

Excel asks for a password you do not have: Ask the workbook owner or the person who set up protection. SharePoint ownership or file-edit permission does not automatically reveal a worksheet password. Do not overwrite the shared workbook with a separate unprotected copy; coordinate with its owner and follow your organization’s recovery process.

Changes do not appear for other collaborators: Check that you saved the SharePoint copy and that Excel has completed syncing. Verify that you and the other person are opening the same file from the same library, not a download or an older copy. If the workbook is read-only for you, request edit access from the file owner.

A filter, sort, or other action is blocked: Unprotect the sheet and review the allowed actions in the Protect Sheet dialog. Enable only the permissions users need, then protect and test again. Some operations may require additional setup or may behave differently in Excel for the web; test using the same app and account your collaborators will use.

You cannot find the protection controls in Excel for the web: Open the file in the desktop app using the SharePoint workbook’s open menu. The browser interface and supported protection options can change, and the desktop app provides the full Format Cells workflow described above. Make sure you save the workbook back to SharePoint after changing the settings.

Frequently Asked Questions

Can I lock only a few cells instead of the whole worksheet?
Yes. Unlock the cells that should remain editable, leave the other cells locked, and then protect the worksheet. The locked cells become read-only under sheet protection, while the unlocked cells can still be edited.

Do I need a password to lock cells?
No. A password is optional when you protect a sheet. Without one, people with editing access can usually unprotect it more easily. A password helps prevent casual changes to protection settings, but it is not a security barrier for confidential information.

Will cell locking stop someone from editing the SharePoint file?
It limits changes to locked cells on the protected worksheet. It does not control who can open the workbook, and it does not replace SharePoint file permissions. Set access in SharePoint separately.

Can collaborators edit unlocked cells in Excel for the web?
Often they can edit cells allowed by the worksheet protection, but browser capabilities and interface options may differ from desktop Excel. Test the protected workbook in the browser with the type of account collaborators will use. Use desktop Excel to set up or revise the Locked settings.

Does protecting one worksheet protect every tab?
No. Protect each worksheet that needs its own cell restrictions. If you also need to prevent people from adding, deleting, moving, or renaming sheets, look for workbook-structure protection separately; it is not the same as protecting worksheet cells.

Can I hide formulas by locking their cells?
Locking a formula cell prevents edits when the sheet is protected, but it does not by itself hide the formula from someone who can view the workbook. Excel has a separate Hidden setting for formulas that takes effect with sheet protection, but neither feature should be treated as secure concealment of sensitive information.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.