?
Solved

Excel 2010:  How to Protect a Worksheet

Posted on 2013-01-25
5
Medium Priority
?
473 Views
Last Modified: 2013-02-06
I have a worksheet that several people use.  I want to allow them to make entries on this worksheet because we all use it but I do not want them to be able change anything on the worksheet i.e. Delete prior data or a few formulas that I have in a couple of the cells already in the worksheet.  These cells should never be touched as they are automatic.    They also should not be able to delete prior entries made.

So in a nutshell:  

Be able to add data to a specified range of cells.

Cannot delete prior data i.e. They can't go back to last week entries on the spreadsheet and delete those.

Formula cells protected.

Any help with this is greatly appreciated.
0
Comment
Question by:itsmevic
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
webtechgal earned 500 total points
ID: 38821060
I think you want to protect cells of previous data, but not the whole worksheet?

Take a look at this resource -

http://spreadsheetpage.com/index.php/tip/spreadsheet_protection_faq1/
0
 
LVL 20

Assisted Solution

by:clarkscott
clarkscott earned 1000 total points
ID: 38821758
I wrote a routine that locks worksheet cells determined by their backcolor.
For instance, all user edited cells are green background.
On the event WORKSHEET - SELECTIONCHANGE....


'---- this example says to lock the cell if the background is white---
If Range(Target.address).interior.color =  16777215 then
       Selection.locked = true
else
       Selection.locked = false
end if


As the user moves from cell to cell, the cell is locked if it's white.

Scott C
0
 
LVL 26

Assisted Solution

by:redmondb
redmondb earned 500 total points
ID: 38822616
Hi, itsmevic.

Please see attached as a proof of concept. I'm sure that it's too aggressive about protecting earlier data - once the user has filled all data on a row and then selects the next line, the "filled" data cells are locked and those on the new line are unlocked.

So, a couple of requests, please...
(1) What are the rules for which earlier rows the user is allowed to change?
(2) Which columns are the users allowed to enter data into and which columns have the formulas?

Thanks,
Brian.Add-Only.xlsm
0
 
LVL 20

Assisted Solution

by:clarkscott
clarkscott earned 1000 total points
ID: 38824129
Here's a quick example of my lock scheme.
Please view Sheet1.  You many change any WHITE cell.  You can't change the green ones.

The code is in the sheet1 - selectionchange event

Scott C
Lock-Test.xls
0
 
LVL 26

Expert Comment

by:redmondb
ID: 38860714
Thanks, itsmevic.

For the sake of others who may want to do similar things, what did you go with in the end?

Thanks,
Brian.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
New style of hardware planning for Microsoft Exchange server.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question