+ Reply to Thread
Results 1 to 2 of 2

EXCEL MACRO Locking the cells based on cell values from list box

  1. #1
    Registered User
    Join Date
    09-06-2017
    Location
    AB,DE
    MS-Off Ver
    2013
    Posts
    1

    EXCEL MACRO Locking the cells based on cell values from list box

    Hi, I am trying to create an excel sheet, based on values from A2,B2 and C2 the cells A5, A7, should lock
    List box option N;M;H;SH
    A2, B2, C2 = N then lock a4, a5, a6, a7
    A2,B2,C2= M then lock A10
    A2,B2,C2= H then lock A11
    A2,B2,C2= SH then lock A20
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    08-07-2014
    Location
    Quito, Ecuador
    MS-Off Ver
    Excel 2016 & 365, Windows 10
    Posts
    511

    Re: EXCEL MACRO Locking the cells based on cell values from list box

    You can try this code, placed in your Sheet Module
    It works under the following options ( as far as I understood your post):
    if A2= B2= C2 = N then lock a4, a5, a6, a7
    if A2=B2=C2= M then lock A10
    if A2=B2=C2= H then lock A11
    if A2=B2=C2= SH then lock A20
    in any different case, everything is unlocked.

    Please Login or Register  to view this content.
    Last edited by vichopalacios; 09-08-2017 at 05:08 PM.
    Barriers are there for those who don't want to dream

+ 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. Locking cells based on other cells values
    By bbarnesuk in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-08-2016, 02:09 PM
  2. Locking cell based on the validated list selection
    By dillkeva in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-01-2015, 08:35 AM
  3. Locking a cell based upon another cells value
    By maki43 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-16-2012, 09:05 AM
  4. Help with macro, automatical locking cells when excel is closed but only locking 1 sh
    By snoopy1461 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2011, 11:29 AM
  5. Locking cells based on other cell value
    By smalls in forum Excel General
    Replies: 5
    Last Post: 08-20-2010, 07:30 PM
  6. Locking a Range of Cells Based on Other Cell Values
    By _Ryan_ in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-02-2010, 06:59 PM
  7. locking a data validation list based upon cell value
    By abrazee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-18-2006, 04:46 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