+ Reply to Thread
Results 1 to 6 of 6

Locking a Range of Cells Based on Other Cell Values

  1. #1
    Registered User
    Join Date
    01-28-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    30

    Question Locking a Range of Cells Based on Other Cell Values

    I have a worksheet that I want to have different ranges of cells locked, based on a different cells value. What I have right now is something that just locks an individual cell. I can't seem to figure out how to adjust the code to make it work for a range. It is probably very easy, but I cant figure it out. I have a few other ranges that I would want to apply this to, instead of adding the current code I have to each individual cell. But if I could have someone adjust my code for this range, I could adjust it for the others.

    Please Login or Register  to view this content.

    The cell that it should be referencing is B6 and the range of cells I want the code to apply to is A24:B27.

    Thanks in advance!!

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Locking a Range of Cells Based on Other Cell Values

    Hi _Ryan_
    Is this what you mean?
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    01-28-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    30

    Re: Locking a Range of Cells Based on Other Cell Values

    Yes! That is perfect! The only thing I changed was where you had ">2" i changed it to "<2"

    I am going to add this code for all the different ranges I have. If I have any more questions about the code, I will let you know!!

    Thanks again pike!

  4. #4
    Registered User
    Join Date
    01-28-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    30

    Re: Locking a Range of Cells Based on Other Cell Values

    Is there a way to make a check box also work with cells being locked? Like if a checkbox is checked, it unlocks a couple other cells? I have checkboxes that if any one of them is checked, the user can move on to the next question. How can I make the following questions unlock and when they are locked, they should be gray?

  5. #5
    Registered User
    Join Date
    01-28-2010
    Location
    Chicago
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    30

    Re: Locking a Range of Cells Based on Other Cell Values

    nvm i think i got it.

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Locking a Range of Cells Based on Other Cell Values

    Hi _Ryan_
    Can you please mark your post solved if the answer solved your question?

+ 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