How to Lock Font in Excel (with Other Cell Formatting)

Get FREE Advanced Excel Exercises with Solutions!

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.


How to Lock Font in Excel: with Other Cell Formatting

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.

sample dataset


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.

📌 Steps:

  • Select the range B4:D15.

Select the range B4:D15

  • Press Ctrl+1 to open up the Format Cells tab.

Press Ctrl+1 to open up the Format Cells

  • Uncheck Locked and Hidden and click OK.

Using Protect Sheet Command to Lock the Font of a Specific Range of Cells

  • Now, click Review > Protect Sheet.

Using Protect Sheet Command to Lock the Font of a Specific Range of Cells

  • Now, we will set a password, and then check Select locked cells and Select unlocked cells in the Protect Sheet option.

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.

in the Confirm Password popping dialogs 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.

after selecting the range B4:D15, we can see that the Font is blurred

  • 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.

Font and Font Size seem to be editable but nothing has changed

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:

📌 Steps:

  • Select the sheet then right-click on the sheet.
  • Next, select View Code.

Lock Font in Excel Using VBA

  • 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

Lock Font in Excel Using VBA

  • 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


Download Practice Workbook

You can download the practice workbook from the following download button.


Conclusion

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!


Related Articles

<< Go Back to Excel Fonts | Excel Cell Format | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.

Tags:

Al Ikram Amit
Al Ikram Amit

Al Ikram Amit, holding a BSc in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, serves as a key Excel & VBA Content Developer at ExcelDemy. Driven by a profound passion for research and innovation, he actively immerses himself in Excel. In his role, Amit not only skillfully addresses complex challenges but also exhibits enthusiasm and expertise in gracefully navigating tough situations, emphasizing his steadfast commitment to consistently delivering exceptional, high-quality content that adds significant... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo