Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    May 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lock cells in a worksheet (MS Excel 97)

    I am trying to lock a set of cells in a worksheet using the Protection tab. It worked perfectly except that now I can't insert any new records in the worksheet. I have to go to the bottom of the worksheet if I want to do so.
    So, my question is: Is there anyway how I can lock a set of cells and still be able to insert records above or below the locked cells.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Lock cells in a worksheet (MS Excel 97)

    You can't do that directly, but you could create a very small macro to unprotect the worksheet, insert a row or rows, then lock it again:

    Sub InsertInProtectedSheet()
    ActiveSheet.Unprotect
    Selection.EntireRow.Insert
    ActiveSheet.Protect
    End Sub

    You can assign a keyboard shortcut or toolbar button to this macro if you want to use it often. Post back if you need more help.

  3. #3
    New Lounger
    Join Date
    May 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Lock cells in a worksheet (MS Excel 97)

    Thanks for your reply.
    I tried it, I definitely could insert lines and enter data in the cells that are above the locked cells with no problems. but for the lines added after the locked cells, I could insert a line but couldn't enter a value in the cells below the ones I have locked (in other words the cells that are in the same column).
    Thanks

    Sanaa

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Lock cells in a worksheet (MS Excel 97)

    You have to UNLOCK any cells you want to enter data into WHILE the sheet is unprotected to allow editing or UNPROTECT the sheet.

    Any cells you do NOT specifically UNLOCK are LOCKED when protection is enabled. Locked cells can NOT be edited while the sheet is protected.

    Steve

Posting Permissions

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