+ Reply to Thread
Results 1 to 2 of 2

lock cells dependant on another cell value

  1. #1
    Registered User
    Join Date
    11-20-2009
    Location
    Cardiff
    MS-Off Ver
    Excel 2010
    Posts
    25

    lock cells dependant on another cell value

    I have a protected sheet with certain cells unlocked that a user can add data to.

    The password for the sheet is password

    In Cell J14 I will either have a value of Accepting or Refusing

    If J14 = Accepting then Cells G14, G16, G22, J18 should remain unlocked

    If J14 = Refusing then cells G14, G16, G22, J18 should be locked

    I realize that this will have to go as a Worksheet Change event, and I have tried with no success to get the right code as my knowledge is still quite limited.

    I would appreciate any help greatly.

    I should mention that the cells referenced above are merged.

    I have attached the spreadsheet below.

    I have also posted this question here, but it has remained unsolved.

    World Cup Betting V.3.141_TEST.xls

  2. #2
    Registered User
    Join Date
    07-03-2008
    Location
    Hyderabad, India
    MS-Off Ver
    2003 and 2007
    Posts
    58

    Thumbs up Re: lock cells dependant on another cell value

    Hi Mistweaver,

    Yes, the problem of merged cells only you can not set the locked property.

    Below is the code for overcome that issue. Instead of setting lock property for a single cell we need to specify the range of cells (merging cells also).

    Please Login or Register  to view this content.
    Copy this code in to the sheet behind.

    Hopefully it will work for U!!!
    Salim

+ 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