+ Reply to Thread
Results 1 to 5 of 5

Lock range based on cell value

  1. #1
    Registered User
    Join Date
    01-17-2017
    Location
    Cork, Ireland
    MS-Off Ver
    365 pro
    Posts
    10

    Lock range based on cell value

    Hi,
    I am trying to come up with process for an online Excel sheet which will lock access to a range if a cell is set to "Yes"

    Please see below
    Capture.JPG


    I will be sharing this file so need the locking of the cells to happen automatically.
    The conditional cells in column D, Yes/No are already on restricted access to prevent users from selecting.

    Really stuck on this so would really appreciate any help here.

    Thanks,
    Attached Images Attached Images

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    UK
    MS-Off Ver
    various
    Posts
    1,947

    Re: Lock range based on cell value

    you would need to use code to dynamically lock / unlock, however could you use Data Validation rule on your C range relative to value in D?

    e.g. highlight C4:C6 and apply a Custom Data Validation rule of:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    if C4 is non-numeric, or D4 is Yes, the entry attempt would fail...

  3. #3
    Registered User
    Join Date
    01-17-2017
    Location
    Cork, Ireland
    MS-Off Ver
    365 pro
    Posts
    10

    Re: Lock range based on cell value

    Thanks, but I can't seem to get this to work
    when I apply the data validation rule and change column D to Yes, I can still edit column C

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    UK
    MS-Off Ver
    various
    Posts
    1,947

    Re: Lock range based on cell value

    I have attached a working example.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-17-2017
    Location
    Cork, Ireland
    MS-Off Ver
    365 pro
    Posts
    10

    Re: Lock range based on cell value

    Thank you so much! I have no idea why that wouldn't work for me but your's works perfectly.
    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to lock cell based on first value?
    By bensaps10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2014, 09:33 AM
  2. [SOLVED] Lock/Unlock range cells based on text value in other range cells
    By boboivan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-12-2014, 12:50 PM
  3. Lock row based on cell value in same row
    By Eline in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-11-2013, 09:56 AM
  4. [SOLVED] VBA code to lock range based on non blank cell
    By mahmud9935 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2013, 01:56 AM
  5. Conditional Formatting - Grey Out and Lock A range based on a cell value in that range
    By Excelgnome in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2012, 07:31 PM
  6. How to lock and unlock a range of cells based on certain cell's value?
    By potato in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-25-2012, 04:34 AM
  7. Replies: 0
    Last Post: 01-06-2011, 05:58 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