+ Reply to Thread
Results 1 to 2 of 2

Locking a formula in a column where the values change based on drop down menu

  1. #1
    Registered User
    Join Date
    08-19-2014
    Location
    bujumbura
    MS-Off Ver
    2013
    Posts
    6

    Locking a formula in a column where the values change based on drop down menu

    Hello all,

    I hope you are well.

    I have created a drop-down menu combobox of districts and depending on your choice of districts the list of Health Centers in a specific column changes. What I want to do is to protect the contents of the column and the cells that contain the health centers. The problem is that when I lock the cells and I choose a district, the Health Center cells cannot change because the cells are locked. Is there anyway around it?

    I was told to insert the following code into the sheets code:
    Please Login or Register  to view this content.
    I went to the Developer Tab then I chose View Code then I clicked on the Sheet 2 (Sheet 1) and I pasted the code. I got a warning saying that VBA cannot work unless I save in macro-enabled sheet so I did (xlsm).

    I have attached the sample (Please look at sheet 2. The column that I want to block is the column FOSA)

    Thank you
    Ulises
    Attached Files Attached Files
    Last edited by JBeaucaire; 08-20-2014 at 10:15 AM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Locking a formula in a column where the values change based on drop down menu

    You should not need any VBA code for this. (I suggest removing it).
    Instead, try locking all cells that you want don't want to be accidentally changed and then Protect the worksheet. Do remember to unlock the linked cell for your combobox (which is cell B4 on Sheet2 in your attached example).

    HTH!

+ 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 a cell based on drop down menu selection (Protected Worksheet)
    By DRogersICF in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-30-2014, 03:52 PM
  2. Change value of cell based on a drop down menu option.
    By laxtui in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-10-2013, 07:23 AM
  3. Change column in formula based on drop down list
    By tantcu in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-07-2013, 09:17 PM
  4. Want picture to change based on value selected in drop down menu
    By omartin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-13-2013, 05:38 PM
  5. Locking Formula Cells only-SOLVER AND DROP DOWN MENU
    By gtg430i in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2008, 03:32 PM

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