Description of Conditional Formatting with OR Logic in Excel

Description of Conditional Formatting with OR Logic in Excel


Conditional Formatting with OR logic allows you to apply formatting to cells when any one of multiple conditions is met. It uses the OR function in a formula-based conditional formatting rule, enabling Excel to evaluate two or more logical tests and format the cell if at least one condition is TRUE.

How It Works:

The OR function checks multiple logical conditions and returns:

  • TRUE → if any condition is met
  • FALSE → if none are met

When used with conditional formatting, this means the formatting is applied if at least one condition is

Example:

=OR(TEXT(A2,"dddd")="Sunday", TEXT(A2,"dddd")="Saturday")

This conditional formatting formula is designed to highlight weekends (Saturdays and Sundays) in a column of dates in Excel.

Here's how it works:

  • TEXT(A2, "dddd"): This converts the date in cell A2 into its full weekday name (e.g., "Monday", "Tuesday", etc.).
  • The OR function checks whether the weekday is:
    • "Sunday"
    • "Saturday"

If either condition is true, the formula returns TRUE, triggering the conditional formatting rule.

Real-life Example:

Any cell in column A that contains a Saturday or Sunday date will be highlighted with a yellow background and formatted with bold, dark text, as shown in the preview section of the formatting rule.

If you enjoyed learning about CONDITIONAL FORMATTING, there's so much more waiting for you! Dive deeper into the world of Excel with my eBook “Ultimate Conditional Formatting Formulas” — your complete guide to mastering powerful lookup functions like IF, AND, OR, ISBLANK, ISERROR TODAY(), NOW(), DATEDIF() OFFSET, INDEX, INDIRECT and more.

Whether you're a beginner or an advanced user, this book is packed with real-world examples, practical tips, and easy-to-follow explanations to boost your productivity and confidence in Excel.

Start your journey to becoming an Excel pro — just download your copy today !


Post a Comment

Previous Post Next Post