Logic formula

AND / OR in Excel and Google Sheets

Combine conditions: AND needs all to be true, OR needs at least one.

Syntax

=AND(condition1, condition2, ...) =OR(condition1, condition2, ...)
condition
Any comparison that is TRUE or FALSE.

Example

AND / OR example
RowABC
1DuePaidOverdue?
22020-01-10No

C2 =IF(AND(A2<TODAY(),B2="No"),"Yes","No")

Result: Yes

Overdue only when the due date has passed and it is unpaid.

Ready-to-copy formulas

  • Weekend check

    =OR(WEEKDAY(A2)=1,WEEKDAY(A2)=7)

Tips

  • Use inside IF to return text instead of TRUE/FALSE.

Need the whole spreadsheet?

Start from a free template with every formula already in place. Opening a template uses no credits.