Results 1 to 7 of 7

Lock cell if value in another cell equals "Complete"

Threaded View

  1. #1
    Registered User
    Join Date
    07-17-2014
    Location
    Sacramento, CA
    MS-Off Ver
    2007
    Posts
    6

    Lock cell if value in another cell equals "Complete"

    How do I lock a cell if the value of a cell if the value of another cell has the value "Agency" and unlock it if it doesn't?

    Thus if B1 = Agency, C1 is unlocked and D1 is locked, and if other is selected C1 is locked and D1 is unlocked, and if B1 is null, so are C1 and D1? (and so on for B2/C2/D2?) The number of records entered (thus rows) can vary from 0 to several hundred.

    I'd read that the code below would work if I put it in the Data Validation formula box for cell D1, but it did not. The cell was always unlocked and the the value in B1 displayed False when the condition was met. I couldn't put it in C1 because the Data Validation function is already in use for its pull down menu.

    =IF(B1="Agency",FALSE,TRUE)
    Here is what I am trying to do:

    The excel spreadsheet resembles a hard copy of a data entry form that the user is entering the data into. One column in the form asks if the data recorder was employed by a government agency or other. If "government agency" is selected then C1 is unlocked and the user selects the agency from a pull down menu created using the Data Validation function. It "other" is selected, then C1 is locked and D1 is unlocked and the user enters the data recorders name. You cannot have a value in both C1 and D1, one must be null if the other one has a value. The only time they can both be null is if cells A1 and B1 are both not null (which indicates that there is actually a valid record being entered.)

    Does anyone have an idea of how I might approach this issue? I have searched the internet for a solution for two days now and still cannot find an answer that works well for me. Please keep in mind that I am a beginner and to provide comments so I understand the whys.

    A million thanks to all assistants in advance.

    BTW: Please note Title is supposed to say "Agency" not "Complete". Tried to reedit post to change "Complete" in title to "Agency" but couldn't.
    Last edited by NewbieX; 05-29-2015 at 02:23 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Delete Rows if a cell does not equal "Finished" or "Complete"
    By Justair07 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 09-27-2013, 12:40 PM
  2. [SOLVED] Countif a cell equals "x" and cell above is "y"
    By Bishonen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2013, 07:35 AM
  3. User to input character "A", but cell will show time stamp, and lock the cell.
    By matrix1108 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-09-2012, 01:02 PM
  4. [SOLVED] Delete row if cell in Column N equal "Different" or Column P equals "Blank"
    By Cyberpawz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2012, 08:25 AM
  5. Replies: 11
    Last Post: 02-08-2012, 12:36 PM

Tags for this Thread

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