Going Stellar

Home/Google Sheets reference

Google Sheets function · Logical

AND in Google Sheets: syntax and examples

AND checks several conditions and returns TRUE only if all of them are true. You rarely show its result directly: it usually sits inside IF, FILTER or conditional formatting.

Syntax

AND(logical_expression1, [logical_expression2, ...])

Arguments

ArgumentTypeRequiredWhat it does
logical_expression1booleanyesA condition, a cell or a range that should evaluate to TRUE or FALSE.
logical_expression2, ...booleannoMore conditions. AND returns TRUE only when every one of them is TRUE.

Examples

The examples use this table, starting in A1:

OrderPaidAmountCountry
GT-1True250RO
GT-2False90RO
GT-3True40BG
GT-4True120RO
=AND(B2, C2>100)

Result: TRUE

Paid and above 100: both conditions hold for the first order.

Run in a Google Sheet (English US locale) on .

=AND(B3, C3>100)

Result: FALSE

One false condition is enough for FALSE: the second order is unpaid.

Run in a Google Sheet (English US locale) on .

=IF(AND(B4, D4="RO"), "ship", "hold")

Result: hold

AND inside IF: ship only paid orders going to Romania.

Run in a Google Sheet (English US locale) on .

=AND(B2:B5)

Result: FALSE

A whole range: TRUE only if every cell in it is TRUE. One unpaid order makes it FALSE.

Run in a Google Sheet (English US locale) on .

=AND(C5>=100, C5<=200)

Result: TRUE

A between test: the amount is from 100 to 200 inclusive.

Run in a Google Sheet (English US locale) on .

Common errors

  • AND always returns one value. ARRAYFORMULA(AND(C2:C5>100)) does not give a TRUE or FALSE per row; it collapses the whole column into a single FALSE. For a per-row test, multiply the conditions: (B2:B5)*(C2:C5>100).
  • A text cell that is not TRUE or FALSE returns #VALUE!, for example AND(A2) on an order code.
  • Several ranges are combined into one answer, not compared pair by pair.

Compared with Excel

Same syntax and behaviour as AND in Excel.

Sources

  1. AND (Docs Editors Help)

Markdown version · All functions