+ Reply to Thread
Results 1 to 9 of 9

How to Create a If, Then Formula to Gray-out cells based on the If condition.

  1. #1
    Registered User
    Join Date
    03-24-2015
    Location
    Chatsworth, CA
    MS-Off Ver
    2010
    Posts
    12

    How to Create a If, Then Formula to Gray-out cells based on the If condition.

    I have a 4 page Excel form and let’s say if sections D10=Yes, F7=Yes, and F9=Yes on sheet 1, then on sheet3 sections A17 thru A36 and sections B17 thru B36 should be grayed out are locked. How is this written

  2. #2
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: How to Create a If, Then Formula to Gray-out cells based on the If condition.

    This could be done with Conditional Formatting.
    However conditonal formating can not reference cells in an other worksheet.
    To work around this you could have cells on the worksheet which reference the cells on the other worksheet.
    These cells can then be used in the conditional formatting.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: How to Create a If, Then Formula to Gray-out cells based on the If condition.

    CF can reference cells on other sheets in XL2010 and beyond.

    See http://www.techrepublic.com/blog/mic...th-references/

  4. #4
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: How to Create a If, Then Formula to Gray-out cells based on the If condition.

    You're absolute right, PLM.
    Guess XL2003 is still haunting me

  5. #5
    Registered User
    Join Date
    03-24-2015
    Location
    Chatsworth, CA
    MS-Off Ver
    2010
    Posts
    12

    Re: How to Create a If, Then Formula to Gray-out cells based on the If condition.

    Thanks, I was thinking more of a (If, Then) statement. For example +IF(OR(A1="Yes",B1="Yes",C1+"Yes"),"",Then [something that will lock the cells from entries and gray it out]

  6. #6
    Registered User
    Join Date
    03-24-2015
    Location
    Chatsworth, CA
    MS-Off Ver
    2010
    Posts
    12

    Re: How to Create a If, Then Formula to Gray-out cells based on the If condition.

    How can I get that from using conditional text, I dont know how to do that. Can you give me more direction? Thanks

  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,938

    Re: How to Create a If, Then Formula to Gray-out cells based on the If condition.

    It would probably be easier to offer suggestions if you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

    If you need to lock teh cell, you will probably need to use data validation, as well
    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

  8. #8
    Registered User
    Join Date
    03-24-2015
    Location
    Chatsworth, CA
    MS-Off Ver
    2010
    Posts
    12

    Re: How to Create a If, Then Formula to Gray-out cells based on the If condition.

    Cant see away to attach a file here. I am coded a Excel form in Conditional Text, it contains several pages (5) total. I have (3) three selection boxes on Page 1. selection options are "Please select", "Yes", and "No". If Yes is selected in all three boxes, then I want to gray-out a section on Page 3.

    My problem I can create condition to gray out the section if "Yes" is selected, but I cant get it to [ul]only[/ul] gray out when "Yes" is selected in all three boxes . My rule description is:
    Please Login or Register  to view this content.
    Format selection area
    Please Login or Register  to view this content.
    . The code is repeated twice for the three boxes affacting the same selected area.

    How do I get if to gray-out based on all three box conditions and not just one.

  9. #9
    Registered User
    Join Date
    03-24-2015
    Location
    Chatsworth, CA
    MS-Off Ver
    2010
    Posts
    12

    Re: How to Create a If, Then Formula to Gray-out cells based on the If condition.

    I got it to work, thanks

+ 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. Create List Based on a Given Condition
    By ExcelFaninPhils in forum Excel General
    Replies: 2
    Last Post: 05-15-2014, 12:15 AM
  2. [SOLVED] Count Formula, Based on Condition of Two other Cells
    By seraphim666 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-13-2013, 07:31 AM
  3. [SOLVED] Create a list based on whether a condition was met
    By dkrzysik in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 01-02-2013, 08:08 AM
  4. Replies: 2
    Last Post: 06-20-2012, 09:31 AM
  5. create new workbook based on condition
    By kiranindia1986 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-21-2010, 12:05 AM

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