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.


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.

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


Similar Readings


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

Tags:

Al Ikram Amit
Al Ikram Amit

Hello, I'm Amit, a BUET graduate with a passion for Excel. Currently, I work as an Excel & VBA Content Developer at ExcelDemy, contributing insightful articles to the blog. I enjoy sharing my knowledge with others and always look for opportunities to grow as an Excel expert. Feel free to reach out if you need assistance or want to discuss the latest trends in Excel. Let's excel together in the world of data manipulation and analysis!

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo