Enter data in protected cell

%3CLINGO-SUB%20id%3D%22lingo-sub-2619673%22%20slang%3D%22en-US%22%3EEnter%20data%20in%20protected%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2619673%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20Workbook%20with%20a%20few%20worksheets%20with%20some%20macro's.%20The%20macro's%20%2F%20VBA%20are%20protected%20with%20a%20password.%3CBR%20%2F%3EThe%20worksheets%20are%20also%20protected%20with%20a%20password.%20Some%20cells%20in%20the%20worksheets%20can%20be%20used%20to%20enter%20data%20and%20some%20cells%20are%20locked%2C%20mostly%20because%20they%20contain%20hidden%20formulas.%3CBR%20%2F%3E%3CBR%20%2F%3ESomehow%20a%20user%20has%20managed%20to%20enter%20data%20in%20a%20protected%20cell.%20The%20formula%20is%20gone%20and%20overwritten%20by%20the%20entered%20data.%3CBR%20%2F%3E%3CBR%20%2F%3EIn%20my%20opinion%20that%20is%20only%20possible%20bij%20hacking%20the%20worksheet%20and%20remove%20the%20password.%3CBR%20%2F%3EOr%20is%20there%20another%20way%20to%20do%20that%3F%3CBR%20%2F%3E%3CBR%20%2F%3EIt%20is%20Excel%202016%20and%20Windows%2010.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2619673%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2621152%22%20slang%3D%22en-US%22%3ERe%3A%20Enter%20data%20in%20protected%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2621152%22%20slang%3D%22en-US%22%3EI've%20seen%20odd%20cases%20when%20pasting%20information%20into%20a%20protected%20sheet.%20However%2C%20are%20you%20sure%20they%20didn't%20just%20unprotect%20the%20sheet%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2626554%22%20slang%3D%22en-US%22%3ERe%3A%20Enter%20data%20in%20protected%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2626554%22%20slang%3D%22en-US%22%3EOpenOffice%20might%20be%20an%20app%20that%20ignores%20your%20protection%20settings%2C%20as%20Google%20sheets%20perhaps%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2627244%22%20slang%3D%22en-US%22%3ERe%3A%20Enter%20data%20in%20protected%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2627244%22%20slang%3D%22en-US%22%3EYes%2C%20indeed.%20OpenOffice%20shows%20all%20the%20VBA%20code%20but%20you%20cannot%20edit%20the%20locked%20fields.%20And%20with%20Google%20sheets%20you%20can%20edit%20the%20locked%20fields.%3CBR%20%2F%3EWow%2C%20what%20is%20that%20for%20protection%20from%20Microsoft%3F%3F%3CBR%20%2F%3E%3CBR%20%2F%3EIs%20it%20possible%20to%20prevent%20other%20applications%20than%20Microsoft%20Excel%20to%20open%20a%20.xlsm%20file.%20Perhaps%20something%20in%20the%20code%20from%20Workbook_open%3F%20Or%20something%20like%20that%3F%3C%2FLINGO-BODY%3E
Occasional Contributor

I have a Workbook with a few worksheets with some macro's. The macro's / VBA are protected with a password.
The worksheets are also protected with a password. Some cells in the worksheets can be used to enter data and some cells are locked, mostly because they contain hidden formulas.

Somehow a user has managed to enter data in a protected cell. The formula is gone and overwritten by the entered data.

In my opinion that is only possible bij hacking the worksheet and remove the password.
Or is there another way to do that?

It is Excel 2016 and Windows 10.


 

8 Replies
I've seen odd cases when pasting information into a protected sheet. However, are you sure they didn't just unprotect the sheet?

@Jan Karel Pieterse 

 

I have tried to copy text from another sheet to paste it in the protected cell on the protected sheet. But that is not possible. The message appears that it is a protected sheet. So, no pasting possible. At least, not in Windows 10 / Excel 2016. 
So I thought maybe if you open the workbook with OpenOffice. Maybe then it is possible to paste something?

I have tried to copy and paste it in Excel for Mac, but that is also not possible.

To unprotect the sheet you need the password. 
The only thing to edit the protected cell is by unprotecting with the password (and as I mentioned earlier I am sure the don't have it) or by removing the password with a hacking-program (or something like that).

So, what am I missing here?

OpenOffice might be an app that ignores your protection settings, as Google sheets perhaps?
Yes, indeed. OpenOffice shows all the VBA code but you cannot edit the locked fields. And with Google sheets you can edit the locked fields.
Wow, what is that for protection from Microsoft??

Is it possible to prevent other applications than Microsoft Excel to open a .xlsm file. Perhaps something in the code from Workbook_open? Or something like that?

@gandalf1960 It says more about the compatibility of Google sheets when reading Excel files to be honest. Apparently it does not respect the protection setting.

FYI: Sheet protection is quite poor in Excel. A good reason to separate your input and calculations!

@Jan Karel Pieterse
You write that the poor sheet protection in Excel is a good reason to separate the input and calculations.
What do you mean by that? And how do you do that then?
Not using worksheetfunctions in the sheet but more in the vba-code or?

If you know a better way I am very interested in the how.
It means making a clear and "physical" separation between areas meant for data entry and areas containing calculations. it may mean keeping them on separate worksheets. It is also a good idea to plan ahead: some users are used to using cut and paste, which may wreck existing formulas, even if they are in cells on another worksheet. For such situations it may even be beneficial to have the data entry in a dedicated workbook and the calculations in another workbook.

If there are many users involved (or many not-so-very-Excel-savvy users), I would recommend to rethink the data entry process and look for different technology than Excel, such as survey software (which usually have quite good export features so you can process results in Excel) or perhaps Microsoft Forms.
Thank you for your explanation. Now I know what you meant.
Unfortunately this won't work for me, but thank you for your answers.

I was thinking more about not doing the calculations in the sheet itself, but in the vba code.
And then trigger the vba code to do the calculations when leaving the sheet (or something like that).