+ Reply to Thread
Results 1 to 4 of 4

Enable and disable a cell based on a combination

Hybrid View

  1. #1
    Registered User
    Join Date
    05-25-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Exclamation Enable and disable a cell based on a combination

    Hi All,

    Please help me with this:

    I have a worksheet with 2 columns (say Col1 and Col2). Col2 has 2 list values "Yes" and "No".
    Case1. If col2 value is Yes, i need to allow entry into col1 and the corresponding Col1 cell should be filled with green in this case.
    Case2. If col2 value is No, I need to restrict entry into Col1 and the corresponding Col1 cell should be filled with yellow color in this case.

    Can anyone plaese help me here?

    Thanks a lot in advance!!!

    Cheers,
    Tandrima

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Enable and disable a cell based on a combination

    You will use two different features for each need. Assuming column 2 is B and column 1 is A

    1) Color a cell based on the value in another cell on the same row.

    If you need to color column A based on the values in column B:

    a) highlight column A
    b) go to Home > Conditional Formatting > New Rule > Use a formula > Edit the Rule Description
    c) Formula is: =B1="yes"
    Format...Fill: Green
    OK > OK

    d) go to Home > Conditional Formatting > New Rule > Use a formula > Edit the Rule Description
    c) Formula is: =B1="no"
    Format...Fill: Red
    OK > OK



    2) Lock a cell for data entry based on the value in another column on same row


    a) Highlight column A
    b) go to Data > Data Validation and apply these setting:

    Allow: Custom
    Source: =B1<>"no"
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-25-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Enable and disable a cell based on a combination

    Hi,

    Thanks a lot for the solution.
    The first option works:
    1) Color a cell based on the value in another cell on the same row.

    But the second option does not.

    Please help.

  4. #4
    Registered User
    Join Date
    05-25-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Enable and disable a cell based on a combination

    Sorry. I was trying it some other way.

    Both the optins work.

    Thanks a lot !!!

+ 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