AND

Formulas / AND
To test multiple logical conditions at the same time.
AND(logical1, [logical2], ...)
  • logical1 - the first condition to test
  • logical2,... - [OPTIONAL] additional conditions to test

Examples

  • =AND(A2>1,A2<100)

    returns TRUE if A2 > 1 and A2 < 100. Otherwise, it returns FALSE.

  • =IF(AND(A21,A3<100),A3,"The value is out of range")

    returns the value in A3 if A21 is TRUE and A3 < 100. Otherwise, it returns "The value is out of range".

  • =AND(A4>B4,A4<C4)

    returns TRUE if A4 is greater than B4 AND A4 is less than C4. Otherwise, it returns FALSE.

  • =IF(AND(OR(A5,B5),C5),"YES","NO")

    returns "YES" if A5 OR B5 is TRUE AND C5 is TRUE. Otherwise, it returns "NO".

  • =AND(1,TRUE,FALSE)

    returns FALSE because one of the conditions is FALSE.

Summary

The AND function is used to test multiple conditions and returns TRUE if all conditions are met.

  • The AND function is a logical function that requires more than one condition. It returns TRUE if all arguments evaluate to TRUE.
  • The AND function does not support wildcards and returns #VALUE if no logical values are found or created during evaluation.
  • AND is not case-sensitive and ignores text and empty cells.

Frequently Asked Questions

What does the AND function do?
The AND function returns TRUE if all of the arguments evaluate to TRUE. If any argument evaluates to FALSE, AND will return FALSE.
Can AND be used with other logical functions?
Yes, AND can be used with other logical functions. This can expand the usefulness of those logical functions.
What error does AND return if the arguments contain no logical values?
AND returns a #VALUE! error if the arguments contain no logical values.
Does AND ignore text cells and blank cells?
Yes, AND ignores both text cells and blank cells.

Make Better Decisions
With Data

Analyze data, automate reports and create live dashboards
for all your business applications, without code. Get unlimited access free for 14 days.