• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

Protect an excel sheet

Hi Experts,

I have an excel workbook with three sheet, I want to protect sheet2 to ( not allow anyone to copy the contents ).

Would you please advice how to do that.

What I want to do is after update the sheet2 of workbook test.xls put the protection. Anyone can open the workbook only the sheet2 can be view but no one can copy or choose the data of any cells of the sheet2 it will ask for password.


Thanks for your prompt response in advace.
0
alam747
Asked:
alam747
1 Solution
 
COACHMAN99Commented:
on the ribbon bar (review) select protect sheet, check the applicable boxes, and add a password.
0
 
Scott ThomsonCommented:
Be Careful of passwords in corporate environments. If you are away or you leave then it can be very hard to get the document back.

Or if you forget the password then you are stuffed. Or if you do want some people to see it but not others then some have the password and you can assure yourself that they give the password to others.

I would suggest using your companies security policy on a folder that contains that file. have them create 2 security groups one for read and 1 for read write. put you and the other trusted people in read write and all others as read.

this will only stop them editing the file not copying data from it.
0
 
alam747Author Commented:
In above way it still allow to choose cells and copy the contents which I do not want to.
It does not allow to change the data of the sheet2 but do not restrict to copy data from any cell, which I am looking for not allow other to choose to copy and paste it to elsewhere.


Please advice.
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
Scott ThomsonCommented:
I would say the ultimate best way to do this is with a macro..

something similar to the one here

https://au.answers.yahoo.com/question/index?qid=20100103214412AAxtRD9

a macro is code within excel that governs the worksheet or document.
0
 
byundtCommented:
If you protect the worksheet and uncheck the "Select locked cells" option , then the user can't do a copy & paste. They can override this limitation by providing a password.

Note that the user can set a formula (in another worksheet or workbook) to return data from the protected sheet and get a copy of the data that way. You could, of course, use  macro code that:
1.  Won't let the workbook be viewed if VBA isn't enabled (that's one of the things that the code in Scott Thomson's Yahoo link does)
2.  Won't open the workbook if any other workbook is open
3.  Won't allow any other workbook to be opened if your workbook is open
4.  Won't allow the user to view any other worksheets in the workbook
5.  Won't allow the user to insert new worksheets in the workbook
6.  In Excel 2003 and earlier, you can use VBA code to remove the Copy button from the toolbar and shortcut key combination. In Excel 2007 and later, you can remove the Copy button and shortcut key combination by editing the XML in the file (very fiddly, but can be done)

But even if you did all that, there is a widely available macro that can crack the worksheet protection password if it was installed in Excel 2010 or earlier. Once the user runs that macro, he can unprotect the worksheet and copy data readily. Excel 2013 has more sophisticated worksheet protection, but it can still be defeated easily by someone that knows how.

The user can also copy data from a hidden worksheet (one of the things that the code in Scott Thomson's Yahoo link does) into another workbook using formulas if macros are not enabled in your workbook. The user could also use a one-line macro to copy your data from the hidden worksheet into his own workbook.

Bottom line: it is impossible to absolutely, positively prevent the user from copying your data. The best you can do is to make it difficult enough that honest people remain honest. A scoundrel will inevitably be able to defeat your protections.
0
 
alam747Author Commented:
Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now