In many situations, the main editor of an Excel workbook does not allow others to change the font, font size, fill color, etc. cell formatting in a list of datasets due to the rules and norms of the company or any kind of organization. In this method, we will explore the problem and how to solve that issue. So, the discussion of today’s topic is- how to lock font in Excel.
Lock Font and Other Cell Formatting in Excel: 2 Simple Methods
We are going to lock the font with other cell formatting in the B4:D15 range yet the cell data will be editable but the fonts are not.
1. Using Protect Sheet Command to Lock the Font of a Specific Range of Cells
Making locked cells is an easygoing approach in Excel. We will do it using Format Cells and Protect Sheet in Excel. So, follow these steps and try them yourself.
- Select the range B4:D15.
- Press Ctrl+1 to open up the Format Cells tab.
- Uncheck Locked and Hidden and click OK.
- Now, click Review > Protect Sheet.
- Now, we will set a password, and then check Select locked cells and Select unlocked cells in the Protect Sheet option.
- Finally, in the Confirm Password popping dialog box, we have reentered and protected the sheet.
- Notice in the following image, after selecting the range B4:D15, we can see that the Font is blurred which indicates we have locked the font for the selected range.
- Thus, we have locked the data.
- In the meantime, Font and Font Size seem to be editable but in the GIF file, we have shown that we changed Font from Calibri to Abadi and Font Size from 13 to 12.
- However, nothing has changed in the data range.
Read More: How to Change Font in Excel to All Caps
2. Lock Font in Excel Using VBA
There is another option to lock fonts in Excel and that is using VBA. To do so, we have to just follow the steps that are shown below:
- Select the sheet then right-click on the sheet.
- Next, select View Code.
- Now we are going to enter the VBA code in a new module like the image below:
Sub LockFormatButAllowDataEntry() ActiveSheet.Protect Userinterfaceonly:=True, AllowFiltering:=True Range("B4:D15").Locked = False MsgBox "Data entry is allowed but formatting cannot be changed in B4:D15", vbInformation, "Notice!" End Sub
- Now, if you press the Run button, the current sheet will be locked.
- As a result, the cell formatting of the current sheet cannot be changed unless you disable the Protect Sheet button from the Review tab. This time you will not need to set any password.
Read More: How to Change Font in Excel for All Sheets
- How to Change Font Size of the Whole Sheet with Excel VBA
- Excel VBA: Change Font Color for Part of Text
- How to Use VBA Code to Change Font Color in Excel
Download Practice Workbook
You can download the practice workbook from the following download button.
Follow these steps and stages to lock font in Excel. You are welcome to download the workbook and use it for your own practice. If you have any questions, concerns, or suggestions, please leave them in the comments section. Goodbye!
- [Solved]: Font Changes Automatically in Excel
- Increase Font Size for Printing in Excel
- How to Change Default Font in Existing Excel Workbook
- [Fixed!] Excel Default Font Is Not Changing
- How to Increase Font Size Using Keyboard in Excel
- How to Change Font Within Formula in Excel
- How to Change Font Style in Excel
- How to Change Font Size in Excel
- [Fixed!] Unable to Change Font Color in Excel