+ Reply to Thread
Results 1 to 5 of 5

Need help using AND in Conditional Formating

  1. #1
    Registered User
    Join Date
    10-22-2017
    Location
    Jacksonville, FL
    MS-Off Ver
    365
    Posts
    73

    Need help using AND in Conditional Formating

    I cannot figure out how to use AND with two variables. The concept is, that a column formatting needs to be changed if NO from the declarations-page is selected. For example for the color Yellow, If I select YES for yellow in the declarations page, all the YELLOW CELLS in Column L should be yellow which is the default color. If I select NO for yellow in the declarations page, than the Yellow color would be disabled.

    In the program attached only cell L10 does what I want it to do, when I select YES or NO, only cell L10 changes. I want the whole column to. Any Help would be appreciated.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,907

    Re: Need help using AND in Conditional Formating

    Try:

    =SUMPRODUCT(COUNTIF($L9,Declarations!$B$3:$B$6)*(Declarations!$C$3:$C$6="YES"))
    Attached Files Attached Files

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,907

    Re: Need help using AND in Conditional Formating

    Or try this:

    =COUNTIFS(Declarations!$B$3:$B$6,Data!$L9,Declarations!$C$3:$C$6,"YES")

  4. #4
    Registered User
    Join Date
    10-22-2017
    Location
    Jacksonville, FL
    MS-Off Ver
    365
    Posts
    73

    Re: Need help using AND in Conditional Formating

    Thank you for the quick reply. I think my explanation was incomplete. When selecting NO for a particular color in the declarations page I only want those cells with that selected color to be disabled...And visa-versa for YES. For example if GREEN is checked NO in declarations page than the Green cell should turn white in Data(L16) and when selected YES the cell would turn green. Although I have not entered colors for Red and Blue, the same would be true. Currently every cell is turned Yellow in Data(Column L) when Yellow is selected YES in declarations page

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,907

    Re: Need help using AND in Conditional Formating

    CF for Green:

    =(Declarations!$B$3=L9)*(Declarations!$C$3="YES")
    Attached Files Attached Files
    Last edited by Phuocam; 01-19-2019 at 09:07 PM.

+ 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. Replies: 5
    Last Post: 03-14-2014, 04:03 AM
  2. Replies: 4
    Last Post: 01-23-2014, 10:14 AM
  3. Conditional formating-What formula do i need to use in conditional formating
    By warrima in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2009, 12:33 AM
  4. Replies: 6
    Last Post: 08-14-2006, 05:00 PM
  5. Replies: 2
    Last Post: 03-27-2006, 12:10 PM
  6. Install dates formating using conditional formating?
    By Jerry Eggleston in forum Excel General
    Replies: 2
    Last Post: 11-09-2005, 01:49 PM
  7. Replies: 1
    Last Post: 03-08-2005, 03:06 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