+ Reply to Thread
Results 1 to 6 of 6

Conditional formatting with AND() and OR() function

  1. #1
    Valued Forum Contributor
    Join Date
    08-10-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    721

    Conditional formatting with AND() and OR() function

    I am looking to conditionally format using AND and OR functions but i cant seem to get it to work.

    Basically I am trying to merge the two formulae to make one RULE.

    =AND(L17="",A17<>"")

    and

    =or(C17<>"X",C17<>"Y",C17<>"Z")

    but adding a rule that says this:
    =AND(L17="",A17<>""),or(C17<>"X",C17<>"Y",C17<>"Z")

    doesnt seem to work.......what am i missing?

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Conditional formatting with AND() and OR() function

    Try this…

    =AND(L17="",A17<>"",OR(C17<>{"X","Y","Z"}))


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Conditional formatting with AND() and OR() function

    Try
    =AND(L17="",A17<>"",C17<>"X",C17<>"Y",C17<>"Z")

  4. #4
    Valued Forum Contributor
    Join Date
    08-10-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    721

    Re: Conditional formatting with AND() and OR() function

    Jonmo1 yours works brilliantly thankyou!

    sixthsense yours returns an error saying you cannot use arrays in a conditional formatting setup...

    SOLVED and rep to you both...thanks!

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Conditional formatting with AND() and OR() function

    Oopss... sorry for that... I forgot that you are going to use it in CF...

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Conditional formatting with AND() and OR() function

    You're welcome.

+ 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. Conditional Formatting or IF Function?
    By jess_db in forum Excel General
    Replies: 0
    Last Post: 07-20-2011, 09:30 AM
  2. Using the Or function in conditional formatting
    By Chemistification in forum Excel General
    Replies: 2
    Last Post: 08-02-2010, 09:17 AM
  3. Can we do OR function in Conditional Formatting?
    By Lewis Koh in forum Excel General
    Replies: 6
    Last Post: 12-15-2009, 05:58 AM
  4. Conditional Formatting Function Help
    By hokeyplyr48 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-02-2008, 12:31 PM
  5. IF Function and Conditional Formatting
    By excelRookie06 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-27-2007, 09:16 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