+ Reply to Thread
Results 1 to 14 of 14

How can I protect a number of cells from being modified by users?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-25-2012
    Location
    CT
    MS-Off Ver
    Excel 2016
    Posts
    134

    How can I protect a number of cells from being modified by users?

    Hi All

    I have a number of cells, and I need to protect them from being changed by the users ?

    Any help?

    Thanks in advance

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: How can I protect a number of cells from being modified by users?

    You need to password protect the sheet.

    Review tab >> Protect sheet
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    11-05-2011
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: How can I protect a number of cells from being modified by users?

    does excel offer the ability to selectively protect a single cell or range.

    I know they have the "allow users to edit ranges" function but i can never seem to get it to work properly.

    and if i select all cells, unprotect, then lock only the cells in the range i want locked, then enable the user to do everything except select locked cells. Then the user still doesn't have access to a lot of functions. It seems very limited in it's functionality or maybe i'm just not using it right
    Last edited by JTwrk; 05-24-2012 at 03:11 PM.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: How can I protect a number of cells from being modified by users?

    Yes you can limit the protection to a single cell if you so desire.

    Ctrl + 1 >> Format cells >> Protection tab >> Locked (Check or uncheck) >> Protect workbook

  5. #5
    Registered User
    Join Date
    11-05-2011
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: How can I protect a number of cells from being modified by users?

    You still have to enable protection though, and even if you check every box, excel still turns off functionality that would normally be harmless and not impact the sheet


    Like say i want to protect A1:E1. The user can do anything else in the spreadsheet except mess with that range, i still have to protect the workbook and even if i have all other cells unprotected it keeps them from using certain features that normally are allowed and that wouldn't cause a problem or impact that range in any way

    basically a way to lock a range without protecting the sheet, such that a password box pops up only if someone does something that impacts the range

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: How can I protect a number of cells from being modified by users?

    JTwrk,

    Please follow the forum rules and create your own thread if you have a question. I answered the first one, but this thread belongs to TallOne and his/her query.

  7. #7
    Forum Contributor
    Join Date
    01-25-2012
    Location
    CT
    MS-Off Ver
    Excel 2016
    Posts
    134

    Re: How can I protect a number of cells from being modified by users?

    Hi JTwrk, thanks for your contribution

  8. #8
    Forum Contributor
    Join Date
    01-25-2012
    Location
    CT
    MS-Off Ver
    Excel 2016
    Posts
    134

    Re: How can I protect a number of cells from being modified by users?

    Hi xladept
    Thanks for your reply, I've just seen it, let me try it and I'll update you

    Thanks again

  9. #9
    Registered User
    Join Date
    11-05-2011
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: How can I protect a number of cells from being modified by users?

    Quote Originally Posted by TallOne View Post
    Hi Jeff

    Thanks for your reply, I don't want to protect the whole worksheet, I only need to protect a number of cells in a worksheet, and in the same time the user can edit the unprotected cells. I followed your steps in (#4) but does not work

    Thanks
    How much functionality do the users need in editing the cells

    You can select all cells>format cells>protection>unprotect/unclick the locked box

    then select the range you want protected>format cells>protection>Locked

    then go to the protect worksheet button, choose what you want users to be allowed to do and then protect the worksheet. Users will be allowed to edit the contents of unlocked cells and won't be allowed to edit the contents of your locked range.

    However, when you do this even if you checked every box users are barred from certain functionality. For example lets say you only protected a range of helper cells in a column to the far right of your info range, cells that had constants or calculated values that the user didn't need to see or edit and that fed into the info range.

    Now you want to filter on your info range or turn off the autofilter that's already on your info range, oh wait you can't because excel has barred you from that functionality even though you clicked every check box. You can only use the autofilter if it was already turned on before the sheet was protected and once it is protected you can't turn it off without unprotecting. And if it wasn't already on, tough luck you can't turn it on even though it has no impact on your locked range.

    I find it frustrating and it's why i think excels protect function is very limited in it's functionality.
    Last edited by JTwrk; 05-24-2012 at 03:46 PM.

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How can I protect a number of cells from being modified by users?

    Hi TallOne,

    You could use event code like this in that sheet:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.row = 1 Then
    If Target.Column < 6 Then
    Cells(Target.row + 1, Target.Column).Select
    End If: End If: End Sub
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  11. #11
    Forum Contributor
    Join Date
    01-25-2012
    Location
    CT
    MS-Off Ver
    Excel 2016
    Posts
    134

    Re: How can I protect a number of cells from being modified by users?

    Hi Jeff

    Thanks for your reply, I don't want to protect the whole worksheet, I only need to protect a number of cells in a worksheet, and in the same time the user can edit the unprotected cells. I followed your steps in (#4) but does not work

    Thanks

  12. #12
    Forum Contributor
    Join Date
    01-25-2012
    Location
    CT
    MS-Off Ver
    Excel 2016
    Posts
    134

    Re: How can I protect a number of cells from being modified by users?

    Hi xladept
    Could you please attach a workbook with your code (as example), please

    Thanks

  13. #13
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: How can I protect a number of cells from being modified by users?

    Maybe reading through some tutorials on-line may help...

    This is just one of many...

    http://spreadsheets.about.com/od/exc...8_lockcell.htm

  14. #14
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How can I protect a number of cells from being modified by users?

    Hi TallOne,

    Here's a book:

    TallOne.xls

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1