2 Easy Ways to Protect Excel Sheet but Allow Data Entry

In this article, I’ll show you three excellent methods on how to protect Excel sheet but allow data entry in Excel. Furthermore, these strategies will allow you to solve the problem that brought you here. However, you will learn some important Excel features and functions in this post that will come in handy for any Excel job.


📁 Download Excel File

The sample worksheet that was used during the discussion is available to download for free right here.


Learn to Protect Excel Sheet but Allow Data Entry with These 2 Methods

Here in this article, we will learn how to protect Excel sheet but allow data entry in Excel. To be exact, I’ve provided a total of 3 methods down below. We considered a sales data of a supermarket as a dataset. It contains columns like the product, unit price, quantity, and total. We will try to generate an Excel sheet where employees can only input the quantity of the product.

Sample Sales Data in Excel

Method

1. Locking Cell Range

In this method, I will demonstrate how to protect the Excel sheet but allow data entry in Excel by using the Protection tab. The steps are given below.

⬇️⬇️ STEPS ⬇️⬇️

  • First, open the workbook and select the entire worksheet by clicking Ctrl+A.

Selecting entire data

  • Following that click, Ctrl+1 to open the Format cell Or Select Home > Orientation > Format Cell Alignment.
  • Then go to the Protection window and uncheck the option Locked and click OK.

Selecting option in protection tab

  • Then select the cell that you want to protect.

Selecting cell which will be protected

  • And click Ctrl+1 to open the Format cell window again.
  • Mark check the Lock option and click OK.

Selecting locked option in protection tab

  • Now go to the Review tab and Select Protect > Protect Sheet as I showed in the figure.

Selecting protect sheet option

  • Choose a password in the password box and click OK.

Setting a password

  • Again confirm the Password by typing again and clicking OK.

Confirming password

  • Now the selected cells of your sheet is protected. You can enter data except for these cells.

Results of protecting excel sheet but allowing data entry

  • If you try to edit the protected cells Excel will show you this notification.

messagebox displaying procted zone

Accordingly, you can secure an Excel file but can input data.

Method

2. Using VBA Macro

Finally, we will employ a VBA code to accomplish the same task. The steps are given below.

⬇️⬇️ STEPS ⬇️⬇️

  • Go to the Developer tab and choose the Visual Basic option.
  • Then go the Insert and choose Module.

Visual Basic feature

  • Write down the following VBA code:
Sub Prsheet()
ActiveSheet.Protect Userinterfaceonly:=True, AllowFiltering:=True
Range("D6:D9").Locked = False
MsgBox "Protected Zone"
End Sub

Inserting VBA code

  • Run the code by pressing F5.
  • You will see the sheet is protected but allows data entry only in the Quantity.

Output of protecting excel sheet but allowing data entry

Thus you can secure an Excel file but can input data.


How to Lock Formatting in Excel

Here we will learn how to Lock Formatting using the Format Cell Alignment option in Excel 365. We will use the same dataset as above.

Dataset for Locking Formatting in Excel 365

⬇️⬇️ STEPS ⬇️⬇️

  • Firstly, open the workbook and select the entire worksheet by clicking Ctrl+A.
  • Select Home > Orientation > Format Cell Alignment.
  • Or simply click Ctrl+1.
  • Go to the Protection
  • Uncheck the option Locked.

Selecting option in protection tab

  • Then Select the cell of whom you want to keep Formatting.
  • Again click Ctrl+1 and go to the Protection option.
  • Then check the Locked and click OK.

Selecting option in protection tab

  • Later go to Review > Protect > Protect Sheet.

Selecting protect sheet option

  • Then select a strong password to protect the worksheet.

Confirming password

  • Finally, your Formatted cells are protected.

Output of Lock Formatting in Excel 365

That’s how you can Lock Formatting in Excel 365.


📄 Important Notes

🖊️  Verify that you’ve employed Absolute Reference when it was required. To get an absolute cell reference, press F4.

🖊️  Always look for ways that are easy to use in different situations.

🖊️  Every time you try to use shortcuts on the keyboard.


📝 Takeaways from This Article

📌  You can protect Excel sheets but allow data entry by locking cell range.

📌 Moreover, you can protect Excel sheets but allow data entry using VBA.

📌  In addition, you can Lock Formatting in Excel 365.


Conclusion

First and foremost, I hope you were able to apply the principles I taught in this Excel lesson on how to protect excel sheet but allow data entry. As you can see, there are numerous ways to accomplish this. However, choose the strategy that is best suited to your situation with care. Most essential, if you become confused in any of the processes, I recommend repeating them. After reviewing the Excel file in the practice workbook I shared above, practice on your own since practice makes perfect. Above all, I sincerely hope you can put it to good use. Please share your thoughts in the comments section about how you felt throughout the article and what we should change or add to make things better for you. However, if you have any Excel-related issues, please leave them in the comments section. The Excelden team is available to answer your inquiries at any time. Finally, keep reading to educate yourself. Please visit our website Excelden.com for further Excel-related articles.

(Visited 27 times, 1 visits today)
Md Shamse Tabrej

Md Shamse Tabrej

Hi, I'm Shamse Tabrej. I'm an admirer of Excel who enjoys sharing and solving problems in Excel. I make an effort to investigate all of the choices so that I may point readers toward the most viable solutions. Both the globe and its problems are boundless. Let's assist one another in developing. Reader questions and suggestions are most welcome. 

We will be happy to hear your thoughts

Leave a reply

ExcelDen
Logo