+ Reply to Thread
Results 1 to 7 of 7

If cell dropdown equals no, then make a range of cells uneditable?

  1. #1
    Registered User
    Join Date
    05-01-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    7

    If cell dropdown equals no, then make a range of cells uneditable?

    Hi guys,

    Title basically states my issue. Right now I have a drop down with either Yes/No or A/B/C options with the data validation function. What I'm trying to get is if say A1 = Yes then nothing happens but if A1 = No then A2 & A3 is greyed out or uneditable/protected or at the very least it populates with a centered "N/A". A combination of all 3 would be perfect I can get away with less if it's going to get too messy.

    I've taken a look in conditional formatting and while I can get A2 & A3 to grey out it doesn't do anything to prevent users from entering data.

    Anyone have any thoughts?
    Last edited by jager; 05-10-2013 at 12:30 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: If cell dropdown equals no, then make a range of cells uneditable?

    Hi and welcome to the forum

    CF is purely cosmetic, it just changes the appearance of a cell or range of cells, not what is inthem or what can/cannot be dont with them

    What you might want to look into doing is using Data Validation for the cell you dont want "available?

    If you upload a sample workbook, I can take a look and see if this might be an option for you?
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-01-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: If cell dropdown equals no, then make a range of cells uneditable?

    Thanks for the quick reply.

    The attached is part of a much larger file but I removed all the non relevant bits.

    Does data validation allow cells to be protected? I assume some sort of macro/linking function will be needed? I'm still very much a beginner at macros...
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: If cell dropdown equals no, then make a range of cells uneditable?

    In the file you uploaded, try this.

    Highlight B2:C2
    under Data, select Data Validation
    in the drop-down under "allow", select "custom"
    enter =$A2<>"NO"
    select OK

    Now, put a NO on A2, and then try and type anything in B2:C2
    change the NO to YES and you can enter stuff again
    You can still apply CF to change colors etc, if you want

    Is that something you can work with?

  5. #5
    Registered User
    Join Date
    05-01-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: If cell dropdown equals no, then make a range of cells uneditable?

    Yes that will do just fine, thanks a bunch.

    Just to help with my understanding, with the line

    =$A2<>"NO"

    what does the <> signify?

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: If cell dropdown equals no, then make a range of cells uneditable?

    Not equal to ( < > )

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: If cell dropdown equals no, then make a range of cells uneditable?

    Thanks humding, I was afk for a while

+ 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