+ Reply to Thread
Results 1 to 2 of 2

VBA to check cell value and enable/disable two other cells in same row

  1. #1
    Registered User
    Join Date
    04-21-2015
    Location
    New Delhi
    MS-Off Ver
    2010
    Posts
    1

    VBA to check cell value and enable/disable two other cells in same row

    Hello all
    I'm working on an excel sheet which has 5 columns. All the cells in the columns are drop down lists with data source in a 2nd sheet. I was trying a macro that would disable editing in cells of the same row being changed. i.e., If value in c4 is changed then F4 and G4 need to be enabled/disabled, c5 will control F5 and G5 and so on...

    Using the sheet protect property disables the entire F and G columns. Is there a way to modify the edit property cell wise based on the value selected in the cell in Column C?

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,081

    Re: VBA to check cell value and enable/disable two other cells in same row

    Start by unlocking all the cells in which you will be inputting data. Next protect the sheet. Copy and paste this macro into the worksheet code module. Do the following: right click the tab for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. When you make a selection in column C, the corresponding cells in columns G and F will be locked.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

+ 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. enable and disable cells based on the value of another cell
    By Emma_B in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-09-2013, 08:06 AM
  2. [SOLVED] Enable and disable a cell based on a combination
    By Tandrima in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-25-2012, 12:26 PM
  3. Check Box Enable/Disable Based On Value From VLookup
    By sgp in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-04-2011, 05:57 AM
  4. Disable / enable a cell using a Macro…
    By Naceur in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2005, 01:12 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