AND

Returns TRUE if all its arguments are TRUE; returns FALSE if one or more arguments is FALSE.

Syntax

AND(logical1,logical2, ...)

Logical1, logical2, ...   are 1 to 30 conditions you want to test that can be either TRUE or FALSE.

Examples

AND(TRUE, TRUE) equals TRUE

AND(TRUE, FALSE) equals FALSE

AND(2+2=4, 2+3=5) equals TRUE

If B1:B3 contains the values TRUE, FALSE, and TRUE, then:

AND(B1:B3) equals FALSE

If B4 contains a number between 1 and 100, then:

AND(1<B4, B4<100) equals TRUE

Suppose you want to display B4 if it contains a number strictly between 1 and 100, and you want to display a message if it is not. If B4 contains 104, then:

IF(AND(1<B4, B4<100), B4, "The value is out of range.") equals "The value is out of range."

If B4 contains 50, then:

IF(AND(1<B4, B4<100), B4, "The value is out of range.") equals 50