+ Reply to Thread
Results 1 to 3 of 3

How to use AND and OR in Conditional Formatting

  1. #1
    Registered User
    Join Date
    02-15-2018
    Location
    Brighton, England
    MS-Off Ver
    Microsoft Excel 2019 MSO (16.0.13628.20128) 32-bit
    Posts
    19

    How to use AND and OR in Conditional Formatting

    Hi,

    How can I write: IF B2 = "Goalie" OR "Defender" OR "Def Mid" AND C2 is not blank in Conditional Formatting?

    Thanks in advance for your time.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: How to use AND and OR in Conditional Formatting

    Try

    =AND($C2<>"",OR($B2="Goalie",$B2="Defender",$B2="Def Mid"))
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: How to use AND and OR in Conditional Formatting

    try:

    AND(C2<>"",OR(B2="Goalie",B2="Def Mid")) or
    AND(NOT(ISBLANK(C2)),OR(B2="Goalie",B2="Def Mid"))

    alt1
    OR(B2="Goalie",B2="Def Mid")*(C2<>"")

    alt2
    IF(C2<>"",OR(B2="Goalie",B2="Def Mid"),FALSE)
    IF(C2<>"",OR(B2="Goalie",B2="Def Mid"))

    many ways,

+ 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. [SOLVED] Conditional Formatting based on another cells Conditional Formatting
    By chriskay in forum Excel General
    Replies: 4
    Last Post: 08-22-2019, 05:33 AM
  2. [SOLVED] Override conditional formatting (in general, without changing the conditional formatting)
    By Stormin' in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-21-2017, 07:15 AM
  3. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  4. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  5. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  6. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 PM

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