+ Reply to Thread
Results 1 to 4 of 4

How to disable direct cell editing by typing, but allow formulas?

  1. #1
    Registered User
    Join Date
    02-09-2012
    Location
    Philippines
    MS-Off Ver
    2003
    Posts
    9

    How to disable direct cell editing by typing, but allow formulas?

    I'm trying to disable typing directly into a cell, but I'd like to let it evaluate its formula which is based on a cell beside it. How do I do this? I tried using data protection but that doesn't allow evaluating formulas. Using 2003 version thanks

  2. #2
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: How to disable direct cell editing by typing, but allow formulas?

    1. Select all cells on worksheet and right click and select format
    2. Go to the Protection Tab and unclick Locked
    3. Select the cell you want to protect and right click and select format
    4. Go to Protection Tab and Tick Locked
    5. Go to Tools, Protection, Protect Sheet
    6. Enter password to protect sheet ( and you will be prompted to enter again)
    Now you can change any cell on the sheet except the cell which you locked. Even if it is a formula based on a cell next to it the formula will recalculate.
    By protecting the sheet you will be able to change any cell except the one you locked(i.e the one containing the formula). If there are multiple cells that need to be locked select them all and make them locked cells.
    or
    You could use a worksheet event - place this into the worksheet with the cell you want to protect
    Please Login or Register  to view this content.
    Where G10 is an example representing where the formula is
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

  3. #3
    Registered User
    Join Date
    02-09-2012
    Location
    Philippines
    MS-Off Ver
    2003
    Posts
    9

    Re: How to disable direct cell editing by typing, but allow formulas?

    Thanks buddy, that does the job for now. I'd like to know though if it's possible to remove even the "unprotect sheet" mechanism from the solution, because ideally there shouldn't be a need for anyone to enter a password to enable direct editing of those cells again?

  4. #4
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: How to disable direct cell editing by typing, but allow formulas?

    The easiest way to prevent the user from selecting the cell is to
    1. Place the formula into the cell you want to protect e.g. G11
    2. Place the following code into the worksheet containing the cell you want to protect - Hit ALT F11 to open the VB editor and double click the worksheet (in the left hand column - e.g. Sheet1, Sheet2 etc) containing the formula and copy an paste the following code into the editor window
    Please Login or Register  to view this content.
    3. Close the VB editor
    With this method the user is never able to select the cell and therefore cannot change the formula. This is the only way without use Sheet Protection.

+ 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